When updating from an older version of Plot, make sure no old references to the Plot Projects plugin are in the AndroidManifest. No need to define services of Plot Projects plugin yourself. You do need to register the notification filter and handler yourself when you have one.
To use the library in an Android application, a few steps must be performed.

We have tested compatibility with version 2.2.3 of the Android Gradle plugin.

Step 1: Get the library and the dependencies

Previously, you had to download and add the library manually by going into the dashboard and downloading the library under the “Developer Tools” page, even though this is still possible, we automated this process by creating a Maven repository that allows you to include our library with ease. This guide only explains how to use the Maven repository.

Add it to your project dependencies. Replace the version parameter with the version of your plugin.
For versions 2.2.1-beta and up, the library has a dependency on Google Play Services (version 11.2.0) for Nearby, Location and GCM. However, you have to include the Google maven repository for this dependency to work.

repositories {
   jcenter()
   maven {
     url 'https://maven-repo.plotprojects.com'   
   }
   maven {//using google() when using a recent version is also possible
        url "https://maven.google.com" 
    }
} 
dependencies {
    //specify an explicit version number to ensure you don't get unexpected updates
    compile 'com.plotprojects:plot-android:2.2.1-beta'
}

For earlier versions, you need to add these dependencies, as follows:

repositories {
   jcenter()
   maven {
     url 'https://maven-repo.plotprojects.com'   
   }
} 
dependencies {
   compile group:'com.plotprojects', name: 'plot-android', version:'2.1.0-beta', ext:'aar'
 
   compile 'com.google.android.gms:play-services-gcm:11.0.4'
   compile 'com.google.android.gms:play-services-location:11.0.4'
   compile 'com.google.android.gms:play-services-nearby:11.0.4'
}
Note that the dependencies com.google.android.gms:play-services-gcm and com.firebase:firebase-jobdispatcher are incompatible with each other. If your app requires firebase-jobdispatcher, you have to use com.firebase:firebase-jobdispatcher-with-gcm-dep instead. It should be a drop-in replacement.
Step 2: Set minSdkVersion

Set the minSdkVersion version to at least 14. When using Gradle you can do that by changing build.gradle in the folder of your app.

defaultConfig {
    applicationId "com.myplotapplication"
    minSdkVersion 14
    targetSdkVersion 22
    versionCode 1
    versionName "1.0"
}
Step 3: Define configuration file

Plot uses a configuration file which you have to define as plotconfig.json in your assets folder. When no assets folder is available, you can create one in Android Studio by right clicking on your project, in the Project tool window, and then selecting New / Folder / Assets.

An example of such a config file can be found on our dashboard, as well as the public token you will have to use.

{
    "publicToken": "REPLACE_ME",
    "enableOnFirstRun": true,
    "debug": true
}
Step 4: Almost done!

Call Plot.init(context) to initialize the library from your main Activity.

When calling init from an activity, you can use the this keyword as the first parameter.

import com.plotprojects.retail.android.Plot;
 
public class MyActivity extends Activity {
 
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_my);
 
        Plot.init(this);
    }
}

An example configuration file and your public token can be found on the Download page on our dashboard.You are now ready to receive your first notification. Need more help during testing, look at this guide.

For more details, look at the extensive documentation.