I have a library app where I store each book as an SqliteDatabase. I save all the book dbs on sdcard. My question is if user uninstalls my app, then do all the dbs related to this app get deleted? If no, how can I achieve this?
Thanks.
Generally No actually. When you uninstall, the APK itself (/data/app/com.example.app-1.apk) and the data (sharedprefs/db/etc) in /data/data/com.example.app is removed, but only Android >= 2.2 will also delete anything from the sdcard, and only a specific directory getExternalFilesDir() (/sdcard/Android/data/com.example.app usually).
However some earlier versions of Froyo will also delete when updating an app, which makes it rather dangerous to use for persistent storage.