Data save for an android app after it uninstall or force data clear from settings

青春壹個敷衍的年華 提交于 2019-12-08 06:52:58

问题


I want to give the user some point when they first install the app (but I want it to device specific). It means if he uninstalls and re-installs he will not get that point again. I have found below methods:

  1. Keep device previous data in shared preferences which will be deleted if I release an updates of the app

  2. Store previous data in sql database but if user clears data from settings it will be lost

  3. Create a file in SDcard store data, saving that file in a folder with .foldername and check the file value, problem is that the user can delete it

  4. Every time the user opens the app it sends device id to server, server will check it is previously stored or not before giving point. Problem is that server maintenance should be avoided.

Other than these 3 methods is there any other method? Can you suggest me any other way, or can you please tell me if there is no other method which would be better for 3 and 4?


回答1:


Variation of 4. using Google's backup servers, however the user can delete the data through his system settings.



来源:https://stackoverflow.com/questions/21719922/data-save-for-an-android-app-after-it-uninstall-or-force-data-clear-from-setting

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