Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
164 views
in Technique[技术] by (71.8m points)

Permission not allowed after click by "allow" on android 6

When I first start the application requests permission Manifest.permission.READ_EXTERNAL_STORAGE, I approve it, and try to get a picture of's Galleries. If you try to do something with a file, I get

java.io.FileNotFoundException: /storage/emulated/0/Download/temporary_file.png: open failed: EACCES (Permission denied)

After restart app, the permit is not requested again, because it is already confirmed, and everything works as it should, the files of the gallery normally gets.

Reproduced on the Nexus 5 c android 6.0 and 6.0.1
On the Nexus 6 working all ok.

Just did a test project, which reproduces the problem

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

This is bug in android. More details
I set targetSdkVersion 22.
Permissions to work as previous versions of Android


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...