0

Currently, I'm working on an app that downloads and saves files to /sdcard. But a function I have that detects current sd card status says that no sd card was detected when I run it on the Kindle Fire emulator. My question is: How can I save these files to the Kindle Fire's storage, since it doesn't seem to have an /sdcard directory to save to?

aakbari1024
  • 167
  • 1
  • 3
  • 9
  • 2
    `/sdcard` has been wrong for about two years. Please use the proper methods on the `Environment` class to gain access to external storage. – CommonsWare Aug 14 '12 at 13:50
  • Thanks. Still doesn't solve my problem though. I need a way to save to the Kindle Fire's storage. Using Environment.getExternalStorageDirectory() still tries to open /mnt/sdcard – aakbari1024 Aug 14 '12 at 15:10
  • `/mnt/sdcard` is correct on the Kindle Fire. – CommonsWare Aug 14 '12 at 15:25
  • I'm using the emulator. My other android emulators have sdcard access. A call to Environment.getExternalStorageState() always returns MEDIA_REMOVED, which means there's no external storage detected. – aakbari1024 Aug 14 '12 at 15:28
  • And when I try to save the file without checking the external storage state, it always throws a FileNotFoundException with permission denied when trying to save the file. – aakbari1024 Aug 14 '12 at 15:33
  • Your problem is with your emulator, then. An actual Kindle Fire reports the state as mounted, and allows you to write to it. – CommonsWare Aug 14 '12 at 15:34
  • It doesn't make sense though. I have a virtual SD card for the emulator. And in the "Hardware" field of the AVD settings, it lists the emulator as having SD card support. – aakbari1024 Aug 14 '12 at 15:37

0 Answers0