简体   繁体   中英

How to get write permission on Android 7 SD-card using StorageVolume?

Even after getting a permanent permission to write to the external storage I can't get write access to every folder of my sd-card. How to get those? For instance this app can do this, and I guess second permission dialog (under "Write permission on Android 7") is all about that. How to create that? Article 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:

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

Correct.

Here is a code I'm currently using to get permanent permission:

That has nothing to do with removable storage . That code is for external storage .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM