Commit fb66bcdf authored by Luca Tomaino's avatar Luca Tomaino

Update android.md

parent 0532e6e9
......@@ -266,6 +266,19 @@ There are 2 types of consents, modeled by the GeoUniq.ConsentItem enumeration:
- GeoUniq.ConsentItem.ANALYSIS
- GeoUniq.ConsentItem.CUSTOMIZATION_AND_ADTARGETING
> This is an example that shown how to comunicate the current status of constents to GeoUniq SDK when app starts
```java
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
boolean analysisConsent = readAnalysisConsentStatusFromStorage();
GeoUniq.getInstance(this).setPrivacyConsent(GeoUniq.ConsentItem.ANALYSIS, analysisConsent);
boolean adTargetingConsent = readAdTargetingConsentStatusFromStorage();
GeoUniq.getInstance(this).setPrivacyConsent(GeoUniq.ConsentItem.CUSTOMIZATION_AND_ADTARGETING, adTargetingConsent);
}
}
```
> The following code shows an example of a custom request flow for analysis consent
```java
......@@ -277,8 +290,10 @@ public class MainActivity extends Activity {
public void onUserResponse(boolean isGranted) {
// COMMUNICATE THE USER'S RESPONSE TO THE GEOUNIQ SDK
GeoUniq.getInstance(this).setPrivacyConsent(GeoUniq.ConsentItem.ANALYSIS, isGranted);
...
}
});
...
}
}
```
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment