Courtesy: GitHub

GcmNetworkManager Quickstart

This sample demonstrates how to use the GcmNetworkManager API.


GcmNetworkManager can be used to reliably schedule network operations in your application based on time, charging status, connectivity, and other variables. GcmNetworkManager is similar to the Android JobScheduler API which is available on all Android devices running Lollipop or higher, however GcmNetworkManager is available on any device running Google Play Services.

For more information on GcmNetworkManager, visit:


In order to run this quickstart sample you will need:

  • Android Studio v1.4 or higher
  • An Android device with Google Play Services 8.3 or higher
  • A USB cable

Getting Started

To run the quickstart application:

  • Import the project into Android Studio
  • Connect your Android device over USB, with USB debugging enabled
  • Click Run > Run 'app'


compileSdkVersion 22

applicationId ""

minSdkVersion 9

targetSdkVersion 22

versionCode 1

versionName "1.0"

compile fileTree(dir: 'libs', include: ['*.jar'])

testCompile 'junit:junit:4.12'

compile ''

compile 'com.squareup.okhttp:okhttp:2.7.0'

compile ''



  • android.permission.CHANGE_WIFI_STATE
  • android.permission.INTERNET