And don't forget to initialize the dispatcher using your tracking ID:
classMyKotlinApplication : Application() {overridefunonCreate() {super.onCreate() Batch.start("MY_API_KEY")registerActivityLifecycleCallbacks(BatchActivityLifecycleHelper())// [...]// Here is your Mixpanel instanceval mixpanel = MixpanelAPI.getInstance(this, MIXPANEL_TOKEN)// Register it to the dispatcher MixpanelDispatcher.setMixpanelInstance(this, mixpanel) }}
publicclassMyApplicationextendsApplication { @OverridepublicvoidonCreate() { super.onCreate();Batch.start("MY_API_KEY");registerActivityLifecycleCallbacks(new BatchActivityLifecycleHelper());// [...]// Here is your Mixpanel instanceMixpanelAPI mixpanel =MixpanelAPI.getInstance(this, MIXPANEL_TOKEN);// Register it to the dispatcherMixpanelDispatcher.setMixpanelInstance(this, mixpanel); }}