Contact Us      Sign Up      Login
Add QuickSync to receive your notifications immediately. This uses Google Cloud Messaging and it dependent on Google Play Services. Make sure you already have integrated Plot using the Android integration guide.
Step 1: Add Google Play Services Dependency

Add a dependency on Google Play Services in your gradle file. We’ve tested it with 8.3.x and 8.4.x. It is possible it won’t work with newer major versions of Google Play Services.

dependencies {
  compile "com.google.android.gms:play-services-gcm:8.4.0"
}
Step 2: Add Services

Add a service registrations to your manifest as shown in the snippet.

<receiver android:name="com.google.android.gms.gcm.GcmReceiver" android:exported="true" android:permission="com.google.android.c2dm.permission.SEND">
   <intent-filter>
       <action android:name="com.google.android.c2dm.intent.RECEIVE"></action>
       <action android:name="com.google.android.c2dm.intent.REGISTRATION"></action>
       <category android:name="${applicationId}.gcm"></category>
   </intent-filter>
</receiver>
 
<service android:name="com.plotprojects.retail.android.SyncGcmListenerService" android:exported="false">
   <intent-filter>
       <action android:name="com.google.android.c2dm.intent.RECEIVE"></action>
   </intent-filter>
</service>
 
<service android:name="com.plotprojects.retail.android.SyncInstanceIDListenerService" android:exported="false">
   <intent-filter>
      <action android:name="com.google.android.gms.iid.InstanceID"></action>
   </intent-filter>
</service>
Step 3: Add Permissions

Add the following permissions to your manifest.

  1. <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE"></uses-permission>
  2. <permission android:name="${applicationId}.gcm.permission.C2D_MESSAGE" android:protectionlevel="signature"></permission>
  3. <uses-permission android:name="${applicationId}.permission.C2D_MESSAGE"></uses-permission>
Step 4: Setup Google Project

Follow the steps at the Google Console to setup your Google Project and make sure you enable cloud messaging for your Google project.

GCM
Step 5: Add Config File

Download the google-services.json config and put it in /assets folder of your Android app.

Step 6: Almost done!

Enter the Server API Keyinto the dashboard at  http://admin.plotprojects.com/dashboard/

You are now ready to receive your first notification through QuickSync! For more details, look at the extensive documentation.