(Older Vers 3.5.2) Import the Android SDK (Android Studio or Gradle)

To use xtremepush with your Android App you must first import the SDK. First, download the current client library here. This zip file contains the library. Next you must add the library to your project.

Add the Library to your Project:

Include the xtremepush-lib.aar file as a dependency in the project.

1. Create a local folder aars with the library at the root of your project so that the library can be found at app/aars/XtremePush-lib.aar

2. Modify the repositories section of the app/build.gradle file to look for the local aars folder or add the following repositories section above dependencies if none exists:

repositories {
flatDir {
dirs 'aars'

3. Add the XtremePush library to the dependencies section as shown below:

compile(name:'XtremePush_lib', ext:'aar')

4. Add the latest version of Android Support Version for example

compile "com.android.support:support-v4:23.1.1"

5. Also add the latest version of Google play services 8.3+ as a dependency if not included for example:

compile 'com.google.android.gms:play-services:8.3.0'

If you only want to use the required APIs to keep size down or stay within the multi-dexing limit then use:

compile 'com.google.android.gms:play-services-gcm:8.3.0'
compile 'com.google.android.gms:play-services-location:8.3.0'

6. Finally add the following dependencies

compile 'com.google.code.gson:gson:2.4'
compile 'com.loopj.android:android-async-http:1.4.9'
compile 'com.squareup:otto:1.3.8'
compile 'org.altbeacon:android-beacon-library:2.6.1'

7. Sync the project with the gradle file.

Have more questions? Submit a request


Article is closed for comments.