Profile data migration
class YourApp : Application() {
override fun onCreate() {
super.onCreate()
// Disable profile's migration
Batch.disableMigration(
EnumSet.of(
// Whether Batch should automatically identify logged-in user when running the SDK for the first time.
// This mean user with a custom_user_id will be automatically attached a to a Profile and could be targeted within a Project scope.
BatchMigration.CUSTOM_ID,
// Whether Batch should automatically attach current installation's data (language/region/customDataAttributes...)
// to the User's Profile when running the SDK for the first time.
BatchMigration.CUSTOM_DATA
)
)
// Then start the sdk
Batch.start("YOUR_API_KEY")
registerActivityLifecycleCallbacks(BatchActivityLifecycleHelper())
}
}public class YourApp extends Application {
@Override
public void onCreate() {
super.onCreate();
// Disable profile's migration
Batch.disableMigration(
EnumSet.of(
// Whether Batch should automatically identify logged-in user when running the SDK for the first time.
// This mean user with a custom_user_id will be automatically attached a to a Profile and could be targeted within a Project scope.
BatchMigration.CUSTOM_ID,
// Whether Batch should automatically attach current installation's data (language/region/customDataAttributes...)
// to the User's Profile when running the SDK for the first time.
BatchMigration.CUSTOM_DATA
)
);
// Then start the sdk
Batch.start("YOUR_API_KEY");
registerActivityLifecycleCallbacks(new BatchActivityLifecycleHelper());
}
}Last updated

