I have integrated Google Cloud Messaging.I want that when user logout he should not receive any push notification.For that do i need to unregister the device from receiving push notification at GCM server.Or should it be handled from app's server.What all things related to GCM should I keep in mind or do while logging out?
Asked
Active
Viewed 425 times
-1
-
Possible duplicate of [Unregister a device from GCM using registration Id in Android](http://stackoverflow.com/questions/28057413/unregister-a-device-from-gcm-using-registration-id-in-android) – AL. Sep 27 '16 at 02:05
2 Answers
0
You can unregister device from your server. As a regeneration id is used to send push, delete that id from your server db.
niksya
- 291
- 2
- 11
0
If you dont want user receiving push after sign out. you need to implement a logic on the app server (which send push request to GCM) which you can consume it on the app end while user logs out.
Like if user sign-out delete the corresponding GCM token from the app server.
therealvj
- 51
- 4
-
1what if you're offline when logout; implement something to repeatedly retry even after app reboot? – funkybro Feb 06 '20 at 15:37