如何捕获设备上的应用程序卸载并让服务器知道这一点(iOS/Android) [英] How to catch application uninstalling on device and let server know about this (iOS/Android)

查看:16
本文介绍了如何捕获设备上的应用程序卸载并让服务器知道这一点(iOS/Android)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题描述:

我们有一项服务,其中包含适用于主要移动操作系统的应用程序.我们使用推送通知.当用户登录时,我们存储他的设备授权数据(比如令牌)以供稍后在推送服务中使用.问题在于一个用户的设备授权很少,并且在用户卸载应用程序时正确保持它们的有效性.

We have a service which has applications for main mobile OS’s. We use push notifications. When user is log in, we store his device authorization data (lets say token) for later use in the push service. The problem is about few device authorizations for one user and properly keeping them valid when the user uninstall the application.

示例:

我把我的系统登录信息给了几个人,以防万一.他们通过暴徒登录.应用程序和系统自动将一些设备授权添加到数据库中(令牌).所以现在我们有 1 个用户的 N 个设备令牌.这样如果我们发送推送通知,每个人都会收到它.现在,假设那些安装了应用程序的人想要卸载它.无需注销,他们通过应用程序管理器卸载应用程序.而此时我们没有授权设备的有效数据.如果我们尝试通知他们,通知将不会发送到任何地方.这是错误的,对服务器无用.如何让核心知道一些存储的数据不再有效?

I gave my login to system to a few people, in case to try it. They logged in through the mob. application and the system automatically add a few device authorizations into database (tokens). So now we have N device tokens for 1 user. So that if we send push notification everyone will receive it. Now, suppose those who have installed applications want to uninstall it. Without logout they uninstall application through application manager. And at this time we have NOT VALID data for authorized device. And if we try to notify them, notification will be sent nowhere. Which is wrong, and useless work for server. How to let the core know that some of stored data is no longer valid?

很快 – 在 Android/iOS 中是否有可能触发应用程序删除事件.如果应用程序被删除应用程序调用服务器来清理存储中的数据.或者如果应用程序打开并且用户卸载它,是否会触发 onDestroy() 触发器?或者其他一些?

我不是 iOS 开发人员,也不是 Android 开发人员,只对第二个了解一点,对第一个一无所知.任何建议将被认真考虑.提前致谢.

I’m not iOS developer, not Android developer, just know a little about second one and nothing of the first. Any advice will be appreciated. Thanks in advance.

推荐答案

这取决于您使用的推送服务.Afaik,如果您使用 C2DM,卸载应用程序的行为将自动从 C2DM 取消注册.

That depends on which push service you are using. Afaik, if you are using C2DM, the act of uninstalling the application will automatically unregister it from C2DM.

哦,关于 iOS - afaik 它不会直接跟踪已卸载的应用程序,但是它会带有失败的通知 反馈 服务,在一系列通知失败后(由设备向推送网络报告)将通知您 - 允许您在卸载应用程序后进行清理.

Oh, and about iOS - afaik it does not directly track uninstalled apps, it does however come with a failed notification feedback service that after a sequence of failed notifications (reported by the device to the push network) will notify you - allowing you to clean up after an uninstalled app.

这篇关于如何捕获设备上的应用程序卸载并让服务器知道这一点(iOS/Android)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆