REG ID GCM update - solution?...

22 views
Skip to first unread message

Matias

unread,
Apr 25, 2016, 6:28:19 PM4/25/16
to android-gcm
Hello,
the REGISTRATION ID GCM is regularly updated. So what would be the solution?
- It occurs to me program my app to run a registration GCM daily in the OnCreate of the main activity, but only be updated when the app opens ?.

Thank you for your answer.

Diego Giorgini

unread,
Apr 26, 2016, 11:44:17 AM4/26/16
to android-gcm
Hi Matias,

the Instance ID documentation should answer your question on how to detect when the registration-id needs to be updated:

--
You received this message because you are subscribed to the Google Groups "android-gcm" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-gcm...@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-gcm/62ced0e9-7150-4713-a451-d7712c7081f1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Matias

unread,
Apr 29, 2016, 5:59:17 PM4/29/16
to android-gcm
Hi Diego,
thanks for answering. You speak Castilian ?.

I was reading the documentation you sent me, but I can not understand where I include the refreshToken () in ActivityMain> onCreate? ... I'm not clear, are beginner. If you have a link to an example implementation step by step I appreciate.

regards

Diego Giorgini

unread,
May 2, 2016, 12:16:56 PM5/2/16
to andro...@googlegroups.com
I don't speak Castillian, sorry.

To use the onTokenRefresh() callback you need to implement a Service separate from the activity.

Reply all
Reply to author
Forward
0 new messages