Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ionic 5 Angular: How to clear capacitor storage on app uninstall?

I have the problem that after uninstalling and reinstalling my app, the Capacitor Storage data from the uninstalled app is still available.

I use the standard Storage-Plugin of Capacitor. They say "Stored data is cleared if the app is uninstalled." But that's not the case with me on android.

How can Capacitor Storage be cleared when I uninstall an app?

Many thanks!

like image 966
G-EA Avatar asked Oct 12 '25 20:10

G-EA


1 Answers

I know this is a very late answer, this answer may be helpful to other people like me.

Add android:allowBackup="false" in application tab in your AndroidManifest.xml file. It was true in my case, so the storage variable was returning true even after uninstalling the application.

like image 71
sasi Avatar answered Oct 14 '25 13:10

sasi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!