java - WRITE_EXTERNAL_STORAGE Possible target folders -


when having write_external_storage permission, i'd expect have right write on filesystem (eg. /sdcard,/storage/emulated/0,/storage/sdcard0,/mnt/sdcard,...)

but because of different internal fs structure, i'm not able tell allowed folders on target device.

currently use environment.getexternalstoragepublicdirectory(environment.directory_downloads) downloads folder, in opinion not folder i'm allowed use.

so 2 questions follow:

  1. is there way find out folders can write wih such permission?
  2. when using downloadmanager, possible target folders sae first question?

use environment.getexternalstoragedirectory() available external storage directory.

you android external storage directory. directory may not accessible if has been mounted user on computer, has been removed device, or other problem has happened. can determine current state getexternalstoragestate().

note: don't confused word "external" here. directory can better thought media/shared storage. filesystem can hold relatively large amount of data , shared across applications (does not enforce permissions). traditionally sd card, may implemented built-in storage in device distinct protected internal storage , can mounted filesystem on computer.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -