I have successfully implemented the GCM
framework for push notification in my android application.But I am little bit confused about the function overridden in GcmIntentService
Class by Google.
@Override
protected void onUnregistered(Context context, String registrationId) {
//Do whatever you want
}
When this method will get invoked ?
It will be called after you have unregistered from the GCM servers using the GCMRegistrar.unregister() method.
As documented here in the GCMBaseIntentService docs:
Called after a device has been unregistered.
You should also take a look at the How Unregistration Works documentation as it describes the two ways a device will be unregistered: manually and automatically.