Import the Android SDK

Add the Xtremepush SDK to your Android project

  1. In your app's build.gradle file, add the Xtremepush Maven repository:
repositories {
    maven {
        url 'http://maven.xtremepush.com/artifactory/libs-release-local/'
    }
}
  1. Add the XtremePush library to the dependencies section:
compile 'ie.imobile.extremepush:XtremePush_lib:8.1.0'
  1. If you are using version 8.0 or later of the Xtremepush SDK, please include the latest version of AndroidX.

Otherwise, if you are using an older version of the SDK, add the latest version of Android Support:

compile 'com.android.support:support-v4:28.0.0'

👍

Dependency versions

This example and others below show specific version numbers. You may need to update these version numbers as new updates of these dependencies are released.

  1. Also add the latest version of Google Play services as a dependency if not already included:
compile 'com.google.android.gms:play-services:17.3.4'

Alternatively, if you only want to use the required APIs to keep size down or stay within the multi-dexing limit then add the following dependencies:

implementation 'com.google.firebase:firebase-messaging:20.2.4'
// If not using location the location dependency below can be omitted 
implementation 'com.google.android.gms:play-services-location:16.0.0'
  1. Add the following dependencies:
compile 'com.google.code.gson:gson:2.8.0'
compile 'com.loopj.android:android-async-http:1.4.9'
compile 'com.squareup:otto:1.3.8'
// If not using beacon the final dependency below can be omitted 
compile 'org.altbeacon:android-beacon-library:2.12.3'
  1. Sync the project with the gradle file.
  2. If you are not using Android location services for Xtremepush geofencing or iBeacons, please modify the AndroidManifest.xml :
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" tools:node="remove" />

<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" tools:node="remove" />

Updated 3 months ago



Import the Android SDK


Add the Xtremepush SDK to your Android project

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.