-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
Thanks a lot for sharing the solution regarding opening files on Android. It helped me a lot. I found a solution which works at least for me regarding opening files on external drive (SD card, USB stick etc.). Please have a look my changed code in QSharePathResolver.java
if (isExternalStorageDocument(uri)) {
Log.d("Muzika"," isExternalStorageDocument");
final String docId = DocumentsContract.getDocumentId(uri);
final String[] split = docId.split(":");
final String type = split[0];
Log.d("Muzika","Storage type: "+type+" ,"+split[1]);
if ("primary".equalsIgnoreCase(type)) {
return Environment.getExternalStorageDirectory() + "/" + split[1];
}
else {
return "/storage/"+type+"/"+split[1];
}
}
Is there a problem with this solution? Unfortunately I don't have enough devices to test it generally.
Metadata
Metadata
Assignees
Labels
No labels