Closed Luklek closed 6 years ago
Here's what I do:
On click I reset the consent, no need to show the dialog here actually
GDPR.getInstance().resetConsent()
in the activity before this either check the consent in onResume
/onActivityResult
/onCreate
, whatever is appropriate for your setup...
This way if the user leaves the settings screen he is presented the consent dialog again...
What if the user passed a negative consent in the beginning? does the wording "withdraw" can still be used here? (I guess yes, but asked anyway^^)
I am showing this setting in the NavDrawer like this at the moment:
case R.id.drawer_item_gdpr:
GDPRConsentState consentState = GDPR.getInstance().getConsentState();
mSetup = new GDPRSetup(GDPRDefinitions.ADMOB) // add all networks you use to the constructor, signature is `GDPRSetup(GDPRNetwork... adNetworks)`
.withPrivacyPolicy(AppConfig.PRIVACY_POLICY_URL)
.withForceSelection(true)
.withCustomDialogTheme(R.style.BottomSheet)
.withLoadAdMobNetworks(getString(R.string.admob_pub_id_1), getString(R.string.admob_pub_id_2))
.withNoToolbarTheme(true)
.withBottomSheet(true)
;
GDPRDialog dlg = GDPRDialog.newInstance(mSetup, consentState.getLocation(), false);
dlg.show(this.getSupportFragmentManager(), GDPRDialog.class.getName());
break;
Two items should be displayed in the app's menu: "Privacy Policy" (with the link to detailed privacy policy explaining how we use user's data) and e.g. "Data Protection" or similar opening GDPR dialog.
The default texts say "you can always change your mind in the app settings" or similar and so do all the translations...
So I would put it in the settings, but this is up to you.
The current code looks fine, but can be replaced with following:
GDPR.getInstance().resetConsent(); // after this call the `checkIfNeedsToBeShown` function will show the dialog again
mSetup = ...;
GDPR.getInstance().checkIfNeedsToBeShown(this, mSetup);
Do you have any idea, from GDPR point of view. what the title of such setting should be? something like "Edit personal data consent" maybe?
Also I was wondering, when the user click on this option setting, is good idea to reset the Consent Status before showing the dialog again?
Thanks :)