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

查看:355
本文介绍了如何捕捉卸载应用程序在设备上,并让服务器知道这个(的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.

示例:

我把我的登录系统的几个人,万一来试试吧。他们记录在通过暴民。应用程序和系统自动添加一些设备授权存入数据库(标记)。所以,现在我们有N个设备标记为1的用户。所以,如果我们发送推送通知,每个人都会接受它。现在,假设那些谁安装的应用程序要卸载它。如果不注销,他们通过卸载应用程序管理器应用程序。而在这个时候,我们还没有有效的数据为授权设备。如果我们试图向他们通知,通知将无处发。这是错误的,而对于服务器无用的工作。如何让核心知道一些存储的数据不再有效?

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?

不久 - 有没有在安卓/ iOS的任何可能引发应用程序中删除事件。如果应用程序正在被删除的应用程序呼叫服务器清理数据存储在存储。或者,如果应用程序是开放的,用户将其卸载,会出现的onDestroy()触发器触发?还是其他?

我不是iOS开发者,而不是Android开发者,只知道一点关于第二个并没有什么第一。任何意见将AP preciated。提前致谢。

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它没有的直接的轨道卸载应用程序,但它确实配备了失败的通知<一href="http://developer.apple.com/library/mac/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingWIthAPS/CommunicatingWIthAPS.html#//apple_ref/doc/uid/TP40008194-CH101-SW3"相对=nofollow>意见服务,一系列失败的通知(报道的设备,用以推动网络)后,会通知你 - 让你未安装应用程序后清理。

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天全站免登陆