2

I am using Ionic 2 storage for storing user credentials. On uninstalling the App, storage is not clearing so after re-installing, the App is picking up the user credential of the previous user.

This issue is occurring only in signed APKs. Tested on samsung on7 and lenova vibe models.

How to clear the storage on uninstall? what I am doing wrong?

n00b
  • 1,832
  • 14
  • 25
Prithivi Raj
  • 2,658
  • 1
  • 19
  • 34

2 Answers2

3

Set android:allowBackup to false in AndroidManifest to XML

Prithivi Raj
  • 2,658
  • 1
  • 19
  • 34
  • I am facing same problem in Android Studio also. Even after setting android:allowBackup and android:fullBackupContent it is not deleting my app's package and all files are still their after uninstall. I am testing on Moto G4 Plus - Android 7.0 – AnujDeo Sep 20 '17 at 11:40
  • 1
    @raj please refer to https://forum.ionicframework.com/t/how-to-remove-local-storage-as-app-get-uninstall/14823/23 and https://stackoverflow.com/questions/33169618/an-android-app-remembers-its-data-after-uninstall-and-reinstall – Prithivi Raj Sep 21 '17 at 05:16
  • Thanks for your help – AnujDeo Sep 21 '17 at 09:47
0

you should not need to do anything for this to happen. This looks like a bug in ionic 2

Ionic forum discussion

Suraj Rao
  • 29,388
  • 11
  • 94
  • 103
n00b
  • 1,832
  • 14
  • 25