Suggested reading: Insider and General Data Protection Regulation (GDPR)
This method allows you to get your users' consent to collect data. You can call this method after the SDK initialization at every step where you ask for your users' consent.
Insider SDK collects this data by default. You do not need to call this function if you are not requesting user consent.
| Parameter | Data Type |
|---|---|
| gdprConsent | Boolean |
If you set it to false, the user will not share any data or receive any push notifications until you set it back to true.
Method Signature
public void setGDPRConsent(boolean gdprConsent)fun setGDPRConsent(boolean gdprConsent)Method Example
Insider.Instance.setGDPRConsent(true);You must set the GDPR after the SDK initializes. You can place any GDPR handling after the Insider SDK initializes.