Commit 84b4213a authored by Luca Tomaino's avatar Luca Tomaino

Update android.md

parent 1b9eaea3
......@@ -295,17 +295,28 @@ public class MainActivity extends Activity {
```java
public class MainActivity extends Activity {
//YOUR CUSTOM FLOW THAT ASK THE USER FOR ANALYSIS CONSENT
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestAnalysisConsent();
}
private void requestAnalysisConsent() {
showAnalysisConsentsRequestDialog(this, new AnalysisConsentsListener() {
@Override
public void onUserResponse(boolean isGranted) {
// COMMUNICATE THE USER'S RESPONSE TO THE GEOUNIQ SDK
GeoUniq.getInstance(this).setPrivacyConsent(GeoUniq.ConsentItem.ANALYSIS, isGranted);
...
GeoUniq.getInstance(MainActivity.this).setPrivacyConsent(GeoUniq.ConsentItem.ANALYSIS, isGranted);
}
});
...
}
private void showAnalysisConsentsRequestDialog(Context context, AnalysisConsentsListener analysisConsentsListener) {
// SHOW HERE YOUR CUSTOM DIALOG THAT ASK THE USER FOR ANALYSIS CONSENT
// COMMUNICATE THE USER'S RESPONSE TO THE LISTENER
analysisConsentsListener.onUserResponse(userResponse);
}
}
```
......
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