Migrating from previous versions / Migrate from v2 to v3 |
Use the following instructions to migrate if you integrated automatically.
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); // Remove the following line this.localyticsSession = new LocalyticsAmpSession(this.getApplicationContext()); // Remove the next 2 lines getApplication().registerActivityLifecycleCallbacks( new LocalyticsActivityLifecycleCallbacks(this.localyticsSession)); // Activity Creation Code }
<application android:name=".MyApplication" android:icon="@drawable/ic_launcher" android:label="@string/app_name">