Reputation: 3232
A am developing an android app which is based on coupon scratching. it synchs all the data from the server with php backend. after syncing user scratches the coupon and the code was shown with a code he enters a mobile no and submits it. after submitting he gets to see the prize money behind that scratched code. After first time syncing no internet is necessory. after scratching all the coupon the user updates the data stored in sqlite database, to the online server and the prize money is transfered to respective mobile no. the problem is when user scratch the coupon and knows the money behind the code then he will uninstall the app without updating the scratched data into server and install it again and now he knows the prize money behind each code so he can fill his mobile no on the higher prize money. i cannot synch the data for each scratch because the main requirement of this app is offline working. i have to do it per 25 or 50 scratches. how to save the sqlite database even after the app gets unistalled?
Upvotes: 1
Views: 131
Reputation: 1986
You should use SharedPreferencesBackupHelper . It will backup some of the preference . Please check the documentation from developer site
http://developer.android.com/reference/android/app/backup/SharedPreferencesBackupHelper.html
As I told you just store the the level and phone number into preference.
Hope It will help.
Upvotes: 1