2

As title says, based on path, is there a way to reliable distinguish if the storage is internal or external (SD Card, HDD via USB)?

Thanks

Sasha Nikolic
  • 760
  • 1
  • 8
  • 22
  • 1
    Possible duplicate of [how to check internal and external storage if exist](http://stackoverflow.com/questions/7616974/how-to-check-internal-and-external-storage-if-exist) – ΦXocę 웃 Пepeúpa ツ Dec 03 '15 at 15:06
  • is this sufficent for you? http://developer.android.com/reference/android/os/Environment.html#isExternalStorageRemovable(java.io.File) – Kuffs Dec 03 '15 at 15:07
  • 1
    The question is wrong. What you seem to want is to distinguish between removable and not removable memory. Internal and external is both not removable. – greenapps Dec 03 '15 at 15:09
  • Thanks for all hints, Kuffs info on isExternalStorageRemovable() works the best for me. – Sasha Nikolic Dec 03 '15 at 15:12

1 Answers1

0

try this

Environment.isExternalStorageRemovable()
Seth
  • 845
  • 8
  • 17
  • That method doesn't consider the file path though.. As of API level 21 you can use this method instead: boolean isExternalStorageRemovable (File path) – fejd Oct 13 '16 at 09:32