Detect uninstall event in phonegap app

六眼飞鱼酱① 提交于 2019-11-29 14:56:40

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!