openbmap / radiocells-nlp-android

radiocells.org Unified Network Location Provider
https://radiocells.org
Other
41 stars 13 forks source link

Move data folder from userspace to Android/data #10

Closed agilob closed 9 years ago

agilob commented 9 years ago

Currently data is saved under /storage/emulated/0/Android after uninstalling application the data is not removed. If data would be stored under /storage/emulated/0/Android/data/org.openbmap.unifiedNlp it would be removed with application and would be hidden from user.

Use the following code to get proper directory data:

Log.i(TAG, getExternalFilesDir(null).getAbsolutePath());
/storage/emulated/0/Android/data/app.id/files

All apps (root or not) have a default data directory, which is /data/data/. By default, the apps databases, settings, and all other data go here. If an app expects huge amounts of data to be stored, or for other reasons wants to "be nice to internal storage", there's a corresponding directory on the SDCard (Android/data/)

wish7code commented 9 years ago

Good idea & thanks for the link! Will add that to the todo list..

wish7code commented 9 years ago

Fixed with aeb79ca8c4 ...