Integrate with Enhance - Native Android
General Data Protection Regulation (GDPR)
Enhance offers all of the functionality that you need to be fully compliant with the GDPR. Read more about GDPR compliance here.
Important Notes
As of May 25th 2018, the new GDPR law will be fully enforced, which means that for your client in the EU you must ensure that your apps are compliant.
Service providers have been updating their SDKs to offer methods that allow you to opt in and out of data collection. Some service providers require users to provide their own "opt-in" dialog, which must present a clear choice to the end-user and allow them to either opt-in to having their data collected and processed, or opt-out entirely.
The GDPR does not permit automatically opting users in, even if an opt-out method is provided; it must be an explicit opt-in.
Enhance exposes some functionality to make it possible to use these GDPR compliancy features of the SDKs you include when Enhancing your app. Ultimately, the responsibility lies with you to ensure that you are meeting the appropriate regulation.
For the majority of SDKs that support GDPR, you must present an appropriate choice to the user, clearly outlining what the user is agreeing to and giving them a clear choice to opt in or out. Once you have done this, you can use the methods provided in the Drag and Drop library, listed below, to convey the user's choice through to the SDKs you have integrated.
Example Usage
// Opt-In final Button gdprOptInButton = (Button) findViewById (R.id.gdprOptIn); gdprOptInButton.setOnClickListener(new OnClickListener () { @Override public void onClick(View v) { Enhance.serviceTermsOptIn(); // Opt in to all SDKs } }); // Opt-Out final Button gdprOptOutButton = (Button) findViewById (R.id.gdprOptOut); gdprOptOutButton.setOnClickListener(new OnClickListener () { @Override public void onClick(View v) { Enhance.serviceTermsOptOut(); // Opt out of all SDKs } });
Methods
Enhance.requiresDataConsentOptIn
void Enhance.requiresDataConsentOptIn(
Enhance.OptInRequiredCallback callback
)
true
to the callback method when any kind of opt-in is required by services that are included in your app. This will check if the user is within a country where GDPR regulations are enforced, and whether you have any services that require opt-in which are not already opted into. If this method returns false
then all of your SDKs will be operating as normal, or the user has explicitly opted out of data collection/processing. Parameters:
Enhance.OptInRequiredCallback callback
- Specifies the callback object. (For more information about the Enhance.OptInRequiredCallback
type, see the Interfaces section)
Enhance.showServiceOptInDialogs
void Enhance.showServiceOptInDialogs()
Enhance.showServiceOptInDialogs
void Enhance.showServiceOptInDialogs(
Enhance.OnDataConsentOptInComplete callback
)
Parameters:
Enhance.OnDataConsentOptInComplete callback
- Specifies the callback object. Invoked when all opt-in dialogs finish displaying.
(For more information about the Enhance.OnDataConsentOptInComplete
type, see the Interfaces section)
Enhance.showServiceOptInDialogs
void Enhance.showServiceOptInDialogs(
List<String> requestedSdks,
Enhance.OnDataConsentOptInComplete callback
)
Parameters:
List<String> requestedSdks
- A string array of SDK IDs for which you want to call this method. The Enhance process will instruct you about the identifiers you can use.
Enhance.OnDataConsentOptInComplete callback
- Specifies the callback object. Invoked when all opt-in dialogs finish displaying.
(For more information about the Enhance.OnDataConsentOptInComplete
type, see the Interfaces section)
Enhance.serviceTermsOptIn
void Enhance.serviceTermsOptIn()
Enhance.serviceTermsOptIn
void Enhance.serviceTermsOptIn(
List<String> requestedSdks
)
Parameters:
List<String> requestedSdks
- A string array of SDK IDs for which you want to call this method. The Enhance process will instruct you about the identifiers you can use.
Enhance.serviceTermsOptOut
void Enhance.serviceTermsOptOut()
Interfaces
interface Enhance.OptInRequiredCallback {
void onServiceOptInRequirement(boolean isUserOptInRequired);
}
interfaceEnhance.OnDataConsentOptInComplete {
void onDialogComplete();
}