void onSuccessfulRegistration ( Context context , String regId ) { // You should send the registration ID to your server over HTTP, so it // can use GCM/HTTP or CCS to send messages to your app. getGcmListener ( context ) . sendRegistrationIdToBackend ( regId ) ; // Persist the regID - no need to register again. // Also serves for detection of previous registrations storeRegistrationId ( context , regId ) ; }
Called from an IntentService background thread