The remaining issue we are facing is opening multimedia contents using an Intent for external storage. Apparently, due new policies, /mnt/media_rw/ files cannot be passes by an Intent. When trying to build a content Uri String (using Uri.parse) and use an Intent (Gallery app, for instance, this error is returned):
01-24 18:33:36.548 1852 1938 W ActivityManager: Permission Denial: opening provider com.android.externalstorage.ExternalStorageProvider from ProcessRecord{f579c73 2704:com.android.gallery3d/u0a36} (pid=2704, uid=10036) requires android.permission.MANAGE_DOCUMENTS or android.permission.MANAGE_DOCUMENTS
01-24 18:33:36.549 2704 2905 W Worker : Exception in running a job
01-24 18:33:36.549 2704 2905 W Worker : java.lang.SecurityException: Permission Denial: opening provider com.android.externalstorage.ExternalStorageProvider from ProcessRecord{f579c73 2704:com.android.gallery3d/u0a36} (pid=2704, uid=10036) requires android.permission.MANAGE_DOCUMENTS or android.permission.MANAGE_DOCUMENTS
01-24 18:33:36.549 2704 2905 W Worker : at android.os.Parcel.readException(Parcel.java:1620)
01-24 18:33:36.549 2704 2905 W Worker : at android.os.Parcel.readException(Parcel.java:1573)
01-24 18:33:36.549 2704 2905 W Worker : at android.app.ActivityManagerProxy.getContentProvider(ActivityManagerNative.java:3550)
01-24 18:33:36.549 2704 2905 W Worker : at android.app.ActivityThread.acquireProvider(ActivityThread.java:4778)
01-24 18:33:36.549 2704 2905 W Worker : at android.app.ContextImpl$ApplicationContentResolver.acquireUnstableProvider(ContextImpl.java:2018)
01-24 18:33:36.549 2704 2905 W Worker : at android.content.ContentResolver.acquireUnstableProvider(ContentResolver.java:1468)
Even adding this MANAGE_DOCUMENTS to AndroidManifest the error persists.
A dev from Android-x86 suggested using a FileProvider to create the content Uri before passing it to an Uri. However, as far as I know, you can only use a FileProvider for files inside app directory/domain.
New bundled Marshmallow's FileManager on Settings use a buildBrowseIntent (VolumeInfo class) to open an interface where Files are listed and external apps opened when clicked
What I'd like is any advice on how marshmallow get a external storage file (ex: /mnt/media_rw/31A8-7276/Android/data/somefile.mp3) and open it using on external app.
Hi,
Currently, CMFileManager has some limitations with Android 6.0
One thing is CM is unable to list external storage available and add it to Bookmark List (at least on Android-x86, where we are testing). This was workarounded/fixed by using a VolumeInfo object to iterate all volumes available (EMULATED or PUBLIC), convert it to a StorageManager ArrayList and return it ( see http://sourceforge.net/p/android-x86/packages_apps_CMFileManager/ci/6dfc729a8790c23d2efda4f21bab8123336ae383/)
The remaining issue we are facing is opening multimedia contents using an Intent for external storage. Apparently, due new policies, /mnt/media_rw/ files cannot be passes by an Intent. When trying to build a content Uri String (using Uri.parse) and use an Intent (Gallery app, for instance, this error is returned):
01-24 18:33:36.548 1852 1938 W ActivityManager: Permission Denial: opening provider com.android.externalstorage.ExternalStorageProvider from ProcessRecord{f579c73 2704:com.android.gallery3d/u0a36} (pid=2704, uid=10036) requires android.permission.MANAGE_DOCUMENTS or android.permission.MANAGE_DOCUMENTS 01-24 18:33:36.549 2704 2905 W Worker : Exception in running a job 01-24 18:33:36.549 2704 2905 W Worker : java.lang.SecurityException: Permission Denial: opening provider com.android.externalstorage.ExternalStorageProvider from ProcessRecord{f579c73 2704:com.android.gallery3d/u0a36} (pid=2704, uid=10036) requires android.permission.MANAGE_DOCUMENTS or android.permission.MANAGE_DOCUMENTS 01-24 18:33:36.549 2704 2905 W Worker : at android.os.Parcel.readException(Parcel.java:1620) 01-24 18:33:36.549 2704 2905 W Worker : at android.os.Parcel.readException(Parcel.java:1573) 01-24 18:33:36.549 2704 2905 W Worker : at android.app.ActivityManagerProxy.getContentProvider(ActivityManagerNative.java:3550) 01-24 18:33:36.549 2704 2905 W Worker : at android.app.ActivityThread.acquireProvider(ActivityThread.java:4778) 01-24 18:33:36.549 2704 2905 W Worker : at android.app.ContextImpl$ApplicationContentResolver.acquireUnstableProvider(ContextImpl.java:2018) 01-24 18:33:36.549 2704 2905 W Worker : at android.content.ContentResolver.acquireUnstableProvider(ContentResolver.java:1468)
Even adding this MANAGE_DOCUMENTS to AndroidManifest the error persists.
A dev from Android-x86 suggested using a FileProvider to create the content Uri before passing it to an Uri. However, as far as I know, you can only use a FileProvider for files inside app directory/domain.
New bundled Marshmallow's FileManager on Settings use a buildBrowseIntent (VolumeInfo class) to open an interface where Files are listed and external apps opened when clicked
What I'd like is any advice on how marshmallow get a external storage file (ex: /mnt/media_rw/31A8-7276/Android/data/somefile.mp3) and open it using on external app.
Thanks! Pstglia