question: public Task < Void > handleRegistrationIntentAsync ( Intent intent ) { List < Task < Void > > tasks = new ArrayList < > ( ) ; String registrationId = intent . getStringExtra ( REGISTRATION_ID_EXTRA ) ; if ( registrationId != null && registrationId . length ( ) > 0 ) { PLog . v ( TAG , "Received deviceToken <" + registrationId + "> from GCM." ) ; ParseInstallation installation = ParseInstallation . getCurrentInstallation ( ) ; if ( ! registrationId . equals ( installation . getDeviceToken ( ) ) ) { installation . setPushType ( PushType . GCM ) ; installation . setDeviceToken ( registrationId ) ; tasks . add ( installation . saveInBackground ( ) ) ; } tasks . add ( updateLocalDeviceTokenLastModifiedAsync ( ) ) ; } synchronized ( lock ) { if ( request != null ) { request . onReceiveResponseIntent ( intent ) ; } } return Task . whenAll ( tasks ) ; }
target:  Should be called by a broadcast receiver or service to handle the GCM registration response intent (com.google.android.c2dm.intent.REGISTRATION).