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

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -