Android 2.2 - How do I detect if I am installed on the SDCard or not?

I am writing an android app that stores a lot of media files. They are not the type (and are far too many) to clutter up the users notification or other media directories, but they also must be user-updatable, so I can't put them in the resources. I can use getExternalFilesDir to get a path on the sdcard, but I only want to do that if the app itself is installed on the sdcard. If the app is installed internally, I want to put the media in the internal memory.

So how can I determine if my app is running in internal or external memory?

9
задан ProgrammerTim 23 October 2010 в 04:16
поделиться