I am using GCM and I want to catch errors when registration and schedule retry.
This situation is described in documentation, but it seems that it is outdated.
At first, there is no handleRegistration method in GCMBaseIntentService. It is not a problem because we have onError method. The bigger problem is that it is impossible to override onHandleIntent because it is declared as final. So, I can send retry intent but I don’t know how to correctly catch it. How can I do this?
And the second question. In the documentation it is adviced to pass some kind of verification token, which is actually a random long number. But can’t we receive retry intent after service restart and have another value of this constant? How we can deal with this situation?
As usual, I found solution myself. If anyone is interested, see https://github.com/darja/gcmdemo.
Russian-speakers can also read http://megadarja.blogspot.ru/2012/12/google-cloud-messaging.html