Back to project page appboy-android-sdk.
The source code is released under:
Copyright (c) 2014 Appboy, Inc. All rights reserved. * Use of source code or binaries contained within Appboy's Android SDK is permitted only to enable use of the Appboy platform by customers of Appb...
If you think the Android project appboy-android-sdk listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.appboy.ui.activities; /*from ww w. ja v a 2 s .c om*/ import android.support.v4.app.FragmentActivity; import com.appboy.Appboy; import com.appboy.ui.slideups.AppboySlideupManager; /** * The AppboyBaseFragmentActivity class is a base class that includes the necessary Appboy method * calls for basic analytics and slideup integration. This class extends the Android support library * v4 FragmentActivity class. */ public class AppboyBaseFragmentActivity extends FragmentActivity { @Override public void onStart() { super.onStart(); // Opens (or reopens) an Appboy session. // Note: This must be called in the onStart lifecycle method of EVERY Activity. Failure to do so // will result in incomplete and/or erroneous analytics. Appboy.getInstance(this).openSession(this); } @Override public void onResume() { super.onResume(); // Registers the AppboySlideupManager for the current Activity. This Activity will now listen for // slideup messages from Appboy. AppboySlideupManager.getInstance().registerSlideupManager(this); } @Override public void onPause() { super.onPause(); // Unregisters the AppboySlideupManager. AppboySlideupManager.getInstance().unregisterSlideupManager(this); } @Override public void onStop() { super.onStop(); // Closes the current Appboy session. // Note: This must be called in the onStop lifecycle method of EVERY Activity. Failure to do so // will result in incomplete and/or erroneous analytics. Appboy.getInstance(this).closeSession(this); } }