android - File not found exception when reading external storage -


earlier code working totally fine, , works fine pre android 6 devices, in nexus 5, 6.0.1, unable access data external storage.

it shows file not found exception

java.io.filenotfoundexception: /storage/emulated/0/download/********/*****: open failed: enoent (no such file or directory)

for writing data storage, asking runtime storage permission , part seems fine.

since code working fine in pre-marshmallow devices, looks you've not added runtime permissions in app.

starting android m, need request permissions @ runtime, mentioned in docs :

beginning in android 6.0 (api level 23), users grant permissions apps while app running, not when install app.

read more requesting permissions @ runtime in android here


Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -