crash - Accessing internal storage of Phone in android app? -
this question has answer here:
cant access internal storage file "/sdcard/emulated/0/imagefolder" directory, tried
environment.getexternalstoragedirectory()+"/sdcard/emulated/0/imagefolder"
environment.getexternalstoragedirectory()+"//sdcard//emulated//0//imagefolder"
and tried
system.getenv("external_storage") system.getenv("emulated_storage_target")
double slash (//), single slash(/), tried putting folder name right after these methods app still crashes @ code needs access internal storage of moto g3 .. if knows how access internal memory in marshmallow please help.. thank you!
you need request permission in manifest file.
<uses-permission android:name="android.permission.read_external_storage"/>
and if marshmallow or above need accept permission manually or request on runtime.
Comments
Post a Comment