In the lower Android version, /sdcard/Download can be read and written, but from Android6 when I use code File file = new File("/sdcard/Download/TestResults.xls");
it will throw exception permission denied, I want to find are there a path in emulator that jave code can directly use to create File without asking permission?
Asked
Active
Viewed 45 times
1

Phantômaxx
- 37,901
- 21
- 84
- 115

newszer
- 440
- 1
- 4
- 23
-
If you are getting trouble handling runtime permissions, you can use my simple library. https://github.com/nabinbhandari/Android-Permissions – Nabin Bhandari Dec 19 '17 at 06:10
1 Answers
0
Android-M
ie, API 23 introduced Runtime Permissions for reducing security flaws in android device, where users can now directly manage app permissions at runtime.
You should to use permission API version above 23.
Refer this Android marshmallow request permission?

Ramesh sambu
- 3,577
- 2
- 24
- 39