Starting with Batch 2.0, you can now opt-out from the SDK.
If you plan to send personal user data and have to comply with EU's GDPR, any other data privacy law or simply want to give your users more control regarding their privacy, these methods will help you plug your consent screen to Batch.
In order to opt-out from SDK, simply call:
Opting out will:
Even if you opt-in afterwards, data generated (such as user data or tracked events) while opted out WILL be lost.
You can also wipe the local SDK data:
Remote data will not be wiped. To do so, please make a separate deletion request.
Once you've opted-out (either programatically, or by default), you can re-enable the SDK by calling the following:
Note: Even if you've already done so before opting-out, you are required to call
batch.start()or the SDK won't work until the next start.