简体   繁体   中英

Clean up Parse data after app uninstall

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:

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...

Much appreciated for any help!

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM