Android SDK
Start the SDK
Integration Guide
7 min
prerequisites the fortersdk requires initialization from your application's main context if you haven't set up an application class yet create an application class https //developer android com/reference/android/app/application htmlregister it in your androidmanifest xml http //stackoverflow\ com/questions/2929562/register application class in manifest integration steps 1\ initialize the sdk add the following initialization code to your application class's oncreate() method // get fortersdk instance and initiate it with the application context ifortersdk ftr = fortersdk getinstance(); ftr init(this, appconstants forter site id); you will need to provide a valid forter site id (please use the test site id only for debugging purposes) advanced configuration of the sdk can be done by initializing the sdk with a customized fortersdkconfiguration please consult with your forter implementation engineer before changing the default configuration 2\ register activity lifecycle callbacks after initializing the sdk in the oncreate() method of your application class, please register our built in activity lifecycle callbacks https //developer android com/reference/android/app/application activitylifecyclecallbacks html this step is only required for sdk versions below 3 0 0 if (build version sdk int >= build version codes ice cream sandwich) { 	registeractivitylifecyclecallbacks(ftr getactivitylifecyclecallbacks()); } complete integration example after performing the above steps, here's how your oncreate() method should look @override public void oncreate() { super oncreate(); string mobileid = forterintegrationutils getdeviceuid(this); // get forterclient instance and initiate it ifortersdk ftr = fortersdk getinstance(); ftr init(this, appconstants forter site id // your unique forter site id ); // start generic activity based navigation tracking (fortersdk < 3 0 0) if (build version sdk int >= build version codes ice cream sandwich) { registeractivitylifecyclecallbacks(ftr getactivitylifecyclecallbacks()); } }