0

When i delete my application from my Android phone and reinstall the app again via Android Studio the application still has all the data from the old install.

I use SQLite database for data storage and i use the Shared Preference for some basic information.

How do you guys make sure the db is cleared when the app is deleted?

Would like to hear your insights!

MESP
  • 486
  • 2
  • 17
  • Does this answer? https://stackoverflow.com/a/9602828/3159267 – Rajan Kali May 24 '23 at 23:52
  • @RajanKali a little bit, why is it that when i deleted the app myself the database was not deleted? Could this be because i was 'to quick'? – MESP May 25 '23 at 05:59

1 Answers1

0

Uninstall the app from your device or run:

adb uninstall <your_app_id>

from the terminal to uninstall the app.

This will remove the SQLite database and SharedPreferences.

Atick Faisal
  • 1,086
  • 1
  • 6
  • 13