Batch

class Batch

Entry point of the Batch library

Types

Link copied to clipboard
class Actions
Batch Action manager
Link copied to clipboard
class Debug
Batch Debug module
Link copied to clipboard
Batch EventDispatcher module
Link copied to clipboard
class Inbox
Batch Inbox module
Link copied to clipboard
class Messaging
Batch Messaging module
Link copied to clipboard
class Profile
Batch Profile module
Link copied to clipboard
class Push
Batch Push module
Link copied to clipboard
class User
Batch User module

Properties

Link copied to clipboard
val ACTION_REGISTRATION_IDENTIFIER_OBTAINED: String = "com.batch.android.intent.action.push.REGISTRATION_IDENTIFIER_OBTAINED"
Intent broadcasted locally by the SDK when a push registration identifier has been retrieved (also called "Push Token").
Link copied to clipboard
val BROADCAST_PERMISSION_SUFFIX: String = ".batch.permission.INTERNAL_BROADCAST"
Permission suffix for broadcasts triggered by Batch.
Link copied to clipboard
val EXTRA_REGISTRATION_IDENTIFIER: String = "registration_id"
Extra containing the Registration Identifier for a ACTION_REGISTRATION_IDENTIFIER_OBTAINED broadcast
Link copied to clipboard
Extra containing the Registration Provider name for a ACTION_REGISTRATION_IDENTIFIER_OBTAINED broadcast
Link copied to clipboard
Extra containing the Sender ID (if any) for a ACTION_REGISTRATION_IDENTIFIER_OBTAINED broadcast
Link copied to clipboard
val NOTIFICATION_TAG: String = "batch"
Notification tag.
Link copied to clipboard
Current session ID (changed at each start)

Functions

Link copied to clipboard
open fun copyBatchExtras(@Nullable from: Intent, @Nullable to: Intent)
Copy Batch's internal data from an intent to another.
open fun copyBatchExtras(@Nullable from: Bundle, @Nullable to: Bundle)
Copy Batch's internal data from intent extras to another bundle.
Link copied to clipboard
Set data migrations you want to disable.
Link copied to clipboard
Get the broadcast permission name.
Link copied to clipboard
open fun isOptedOut(@NonNull context: Context): Boolean
Returns whether Batch has been opted out from or not Warning: This method might perform some quick I/O in the caller thread.
Link copied to clipboard
open fun onCreate(activity: Activity)
Method to call on your main activity onCreate.
Link copied to clipboard
open fun onDestroy(activity: Activity)
Method to call on your main activity onDestroy Calling this method if Batch is already stopped or not started will do nothing
Link copied to clipboard
open fun onNewIntent(activity: Activity, intent: Intent)
Method to call on your main activity onNewIntent Calling this method if Batch is already stopped or not started will do nothing
Link copied to clipboard
open fun onServiceCreate(context: Context, userActivity: Boolean)
Method to call on your service onCreate to start Batch.
Link copied to clipboard
open fun onServiceDestroy(context: Context)
Method to call on your service onDestroy to stop Batch.
Link copied to clipboard
open fun onStart(activity: Activity)
Method to call on your main activity onStart to start Batch and support URL scheme events.
Link copied to clipboard
open fun onStop(activity: Activity)
Method to call on your main activity onStop Calling this method if Batch is already stopped or not started will do nothing
Link copied to clipboard
open fun optIn(@NonNull context: Context)
Opt In to Batch SDK Usage.
Link copied to clipboard
open fun optOut(@NonNull context: Context)
open fun optOut(@NonNull context: Context, @Nullable listener: BatchOptOutResultListener)
Opt Out from Batch SDK Usage.
Link copied to clipboard
open fun optOutAndWipeData(@NonNull context: Context)
Opt Out from Batch SDK Usage.
Link copied to clipboard
Control whether Batch should enables the Find My Installation feature (default = true) If enabled Batch will copy the current installation id in the clipboard when the application is foregrounded 5 times within 12 seconds.
Link copied to clipboard
Set if Batch should send its logs to an object of yours (default = null) Be careful with your implementation: setting this can impact stability and performance You should only use it if you know what you are doing.
Link copied to clipboard
Set the log level that Batch should use
Link copied to clipboard
open fun start(@NonNull apiKey: String)
Set the API Key of Batch.
Link copied to clipboard
Configure the SDK Automatic Data Collection.