opt Out
Opt Out from Batch SDK Usage. Requires Batch to be started.
Note that calling the SDK when opted out is discouraged: Some modules might behave unexpectedly when the SDK is opted-out from.
Opting out will: - Prevent onStart or onServiceCreate from doing anything at all - Disable any network capability from the SDK - Disable all In-App campaigns - Make the Inbox module return an error immediately when used - Make the SDK reject any BatchUserProfile or save calls - Make the SDK reject calls to trackEvent, trackLocation and any related methods
Even if you opt in afterwards, data that has been generated while opted out WILL be lost.
If you're also looking at deleting user data, please use optOutAndWipeData
Note that calling this method will stop Batch, effectively simulating calls to onStop, onDestroy and onServiceDestroy. Your app should be prepared to handle these cases. Some features might not be disabled until the next app start.
Opt Out from Batch SDK Usage. Requires Batch to be started.
Same as optOut, with a completion listener.
Use the listener to be informed about whether the opt-out request has been successfully sent to the server or not. You'll also be able to control what to do in case of failure.
Note: if the SDK has already been opted-out from, this method will instantly call the listener with a *failure* state.