问题
When a user installs my app I register his registration ID (android) or device token (iOS) and send push notifications that work fine. But now I want to remove the user from the server when the app is uninstalled.
How can I accomplish this in Phonegap: get an event after which i can unregister the user registration id (android) or device token (ios)?
Note: I am using PushPlugin
回答1:
AFAIK, you cannot know when your app is uninstalled.
For your android app, observe the response GCM returns when you send a notification. If it sends a NotRegistered
message, you can remove that id from your server. Read how unregistration works
For iOS : read this Question and its answer on SO
来源:https://stackoverflow.com/questions/29317635/detect-uninstall-event-in-phonegap-app