Exapption Configuration

Krishna Vattipalli edited this page Aug 24, 2016 · 7 revisions

Welcome to Exapption!

Exapption platform simplifies the process of improving user engagement of your web or mobile app, by providing features like integrating push notifications, ability to collect feedback, capture and analyze crash reports. You can create and manage campaigns using the admin interface or integrate via API to automate notification management. Following are the steps that are to be followed to integrate Android SDK into your Android application.

Create an account at https://app.exapption.com and that should create a default Organization. If you would like to create a new Organization which will allow you to collaborate with your team members, click on the Organization dropdown in the header and follow steps.

Once the Organization is created, create a new app and you are ready to get started with integrating Exapption SDK with your app.

Create a project in Google developer console https://developers.google.com/mobile/add?platform=android&cntapi=gcm and follow the steps.

Copy the server API Key and set it as GCM Key in Settings > Android page.

Add the packagename of the app and save the settings.

If you are using Gradle to build your Android application, add / modify allprojects configuration in the following manner:

allprojects { repositories { jcenter() maven { url "http://dl.bintray.com/exapption/ExapptionSDK" } } }

In the app gradle file add compile 'com.exapption.sdk:exapption-android-sdk:x.x.x' to the dependencies configuration.

dependencies { ... compile 'com.exapption.sdk:exapption-android-sdk:1.0.1' }

In your Android app, create an Application class if it is not present already. In the onCreate() method, add the following statement


Under AndroidManifest.xml, make sure the Application class file is referred in the application tag

<application ... android:name=".Application">

Add the following to your AndroidManifest.xml anywhere between the application tags

        android:permission="com.google.android.c2dm.permission.SEND" >
            <action android:name="com.google.android.c2dm.intent.RECEIVE" />
            <category android:name="YOUR_PACKAGE_NAME" />

        android:exported="false" >

        android:exported="false" >
            <action android:name="com.google.android.gms.iid.InstanceID" />

Keep SenderID for the project in Google Developer Console and APP_KEY from Exapption admin page for your app handy and add the following meta-tags to your AndroidManifest.xml

<meta-data android:name="com.exapption.config.appkey" android:value="EXAPPTION_APP_KEY_FROM_EXAPPTION_APP_SETTINGS" /> <meta-data android:name="com.exapption.config.gcappid" android:value="@string/gcm_appid" />

Create a String value tag in values > string.xml and add

<string name="gcm_appid">SENDER_ID_FROM_GOOGLE_DEV_CONSOLE_PROJECT</string>

Now, for the final piece in the puzzle, in your launch activity or which ever class you plan to enable push notifications, add Exapption.enablePush("USER_UNIQUE_ID", this); to initialize Exapption push notifications.

If you need to pause push notifications after a user SignOut, call Exapption.pausePushNotifications(); to pause notifications and Exapption.resumePushNotifications(); to resume push notifications.

If you need help with the configuration, please reach us at support@exapption.com anytime.

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.