When an App is force moved to SD-Card, where do SharedPreferences go?
I have an Android App which has a service and this should only be installed internally. However some users with ROOT are installing it on SD-Card and are reporting all kinds of strange errors.
When a user does that, where do the SharedPreferences go? Are they also stored on SD-Card (really bad for me as I write them often) or are they always on in开发者_运维百科ternal storage? Some of the errors I've seen seem to indicate this situation.
If so, how do I detect that my SharedPreference file is indeed on the SD-Card?
Thanks!
When the app is moved to the SD card, only the .apk is moved to /mnt/asec/package_name/pkg.apk. The shared_prefs, cache, databases, etc. directories and files remain on the /data partition under /data/data/package_name.
I checked this on my rooted Moto Droid 1 running Bugless Beast 0.6.2.1.
FYI, services will run fine from an app that has been moved to the sd card. The only issue with moving to the sd card is that when the sd card is unmounted, your app (and it's services) won't be able to run.
精彩评论