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

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

javascript - Confirm a form & display message if form is valid with JQuery -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -