清理应用卸载后的数据解析 [英] Clean up Parse data after app uninstall

查看:183
本文介绍了清理应用卸载后的数据解析的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用推送通知的Andr​​oid解析API(v1.9.4),我想知道如何清理解析应用数据(安装,用户和Session对象)作为应用程序被用户卸载。这是可能的呢?我已经看到了2-1年前,表明这种是不可能的一些帖子,我不知道,如果事情变得不同,如果有新的解决方法是:

I'm using Android Parse API for push notifications (v1.9.4) and I would like to know how to clean up Parse app data (Installation, User and Session objects) as the app is uninstalled by the user. Is this possible at all? I have seen some posts from 2-1 years ago that indicates that such is not possible and I wonder if things got different and if there are new workarounds for it:

这些职位以上仅涉及安装拆卸的对象,我无法找到如何拆除会话和用户数据在网络上的信息。我真的
要清理一切要不然奇怪的事情发生,如ParseException的用户名XXX已采取当一些用户应用程序的重新安装后试图注册(通过调用signUpInBackground),更不用说鬼解析装置发出的多余的通知...

These posts above only refer to the installation object removal, and I could not find info on the web on how to remove the session and the user data. I really need to clean up everything or else weird things happen such as ParseException "username XXX already taken" when some user tries to sign up (by calling signUpInBackground) after re-installation of the app, not to mention the redundant notifications sent for ghost parse installations...

大部分AP preciated任何帮助!

Much appreciated for any help!

推荐答案

您可以在用户卸载应用程序,但你能避免一些工作问题的检测。

You can detect if the user uninstall the application but you can avoid the issue with some work.

例如,我已经添加了安装一个新的列其中保存一个指向用户等等下一次用户登录我搜索和删除该用户的previous 安装之后形成新的。这样,你将只有一个安装(与包括设备令牌),每个用户。

For example, I've added a new column in the Installation which save a pointer to the User so next time the user login I search and delete the previous Installation of this user to create the new one after. This way you will only have one installation (with device token included) per user.

我知道,这是难看一点,但它避免这种解析限制的唯一途径。

I know, it's little ugly but it's the only way to avoid this Parse limitation.

这篇关于清理应用卸载后的数据解析的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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