Search code examples
androidcordovacordova-plugins

Cordova - Permanent storage even after uninstall


I am developing an app using cordova (currently only releasing on Android) and I am struggling with storage options.

I am currently using Local Storage which seems to work well, however all data/values are wiped if the user uninstalls and reinstalls the app. I was wondering if there is a plugin or some way to permanently store data on Android even if the user uninstalls the app?

The reason I would like this is to allow the user to keep the coins they have earned/purchased if they were to remove the app and then get it back at a later date? I also have an 'ad free' IAP and I am currently storing a value in Local Storage when the user purchases this so don't want the ads to come back if they uninstall/reinstall.

If this is not possible is there an alternative way to recognise if the user has purchased the Ad Free IAP so they will always have no ads?


Solution

  • You could use cordova-plugin-cloud-settings to persist key/value data between installs / across same-platform devices.