如何使用 StorageVolume 获得对 Android 7 SD 卡的写权限?
How to get write permission on Android 7 SD-card using StorageVolume?
即使获得了写入外部存储的永久权限,我也无法获得对 SD 卡中每个文件夹的写入权限。如何得到那些?例如这个应用程序可以做到这一点,我想第二个权限对话框(在 "Write permission on Android 7" 下)就是关于这个的。如何创建它? Article 也许,解决方案绑定到 StorageVolume class 的 createAccessIntent 方法不知何故...
这是我目前用来获得永久许可的代码:
RxPermissions.getInstance(getActivity())
.request(Manifest.permission.WRITE_EXTERNAL_STORAGE)
.subscribe(granted -> {
if (!granted) return;
showAlternativeDirectoryChooser(); // success
}, throwable -> {
});
Maybe, the solution is bound to the createAccessIntent method of StorageVolume class somehow
正确。
Here is a code I'm currently using to get permanent permission:
与removable storage. That code is for external storage无关。
即使获得了写入外部存储的永久权限,我也无法获得对 SD 卡中每个文件夹的写入权限。如何得到那些?例如这个应用程序可以做到这一点,我想第二个权限对话框(在 "Write permission on Android 7" 下)就是关于这个的。如何创建它? Article 也许,解决方案绑定到 StorageVolume class 的 createAccessIntent 方法不知何故...
这是我目前用来获得永久许可的代码:
RxPermissions.getInstance(getActivity())
.request(Manifest.permission.WRITE_EXTERNAL_STORAGE)
.subscribe(granted -> {
if (!granted) return;
showAlternativeDirectoryChooser(); // success
}, throwable -> {
});
Maybe, the solution is bound to the createAccessIntent method of StorageVolume class somehow
正确。
Here is a code I'm currently using to get permanent permission:
与removable storage. That code is for external storage无关。