Const
Checks whether Batch has been opted out from or not.
A promise that resolves to a boolean value indicating whether Batch has been opted out from or not.
Opt In to Batch SDK Usage.
This method will be taken into account on next full application start (full process restart)
Only useful if you called batch.optOut() or batch.optOutAndWipeData() or opted out by default in the manifest
Some features might not be disabled until the next app start if you call this late into the application's life. It is strongly advised to restart the application (or at least the current activity) after opting in.
Opt Out from Batch SDK Usage
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:
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 batch.optOutAndWipeData()
Note that calling this method will stop Batch. 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
Same as batch.optOut(Context) but also wipes data.
Note that calling this method will stop Batch. Your app should be prepared to handle these cases.
Shows debug view
Android: https://doc.batch.com/android/troubleshooting#implementing-batch-debugger iOS: https://doc.batch.com/ios/troubleshooting#implementing-batch-debugger
Configure the SDK Automatic Data Collection.
DataCollectionConfig for more info.
Here's an example:
Batch.updateAutomaticDataCollection({
geoIP: false, // Deny Batch from resolving the user's region from the ip address.
deviceModel: true // Authorize Batch to use the user's device model information.
});
Batch will persist the changes, so you can call this method at any time according to user consent.
A configuration object to fine-tune the data you authorize to be tracked by Batch.
Batch React-Native Module