I’m new to Android programming and trying to wrap my head around this just to make myself clear about how things work.
When creating Sqlite databases in an Android app, where is the database stored? Does it get deleted when the app is removed? Any info about this would be much helpful in understanding Android programming for people coming from a web development background.
SQlite databases are just files, and they’re treated like any other file: they’re stored (by default) in the application’s private data area (
/data/data/$PACKAGENAME/databases). They’re deleted along with everything else in the application’s private data area.You can create a database on the SD card if you like. They, of course, won’t be removed on uninstallation.