Android 6.0 如何获取 外置SDCard 的写权限?

只能获取到 读权限,写权限无法成功获取,我该怎么获取啊?
好像是android 6.0 不允许第三方应用写,但是还是有不少应用做到了写,
请问这是怎么实现的? 非常感谢

You have to add the following codes into the project's AndroidManifest.xml,


It means your app will get the reading and writing permission with the internal storages.

1.AndroidManifest.xml里面增加


2.在Activity里调用getExternalCacheDirs()会得到内置和外置sdcard路径,当然前提是你插了外置卡,
3.android6.0以后外置卡会默认创建你应用的路径cache和file,你只能在此处进行读写。