You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
[Android Platform]
I try to open video files when the user selects the
'openwith'
button in Android device file manager and then select my app to play the video.
I tried some libraries to get the file uri . all of them gave me the same uri like
"content://com.mi.android.globalfileexplorer.myprovider/external_files/Download/file_name.mp4"
when i try open media file with :
final playable = Media(uri);
await player.open(playable);
it trows exception:
W/System.err(16859): java.io.FileNotFoundException: No content provider: content://com.mi.android.globalfileexplorer.myprovider/external_files/Download/file_name.mp4
W/System.err(16859): at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:1994)
W/System.err(16859): at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:1823)
W/System.err(16859): at android.content.ContentResolver.openFileDescriptor(ContentResolver.java:1656)
W/System.err(16859): at android.content.ContentResolver.openFileDescriptor(ContentResolver.java:1603)
W/System.err(16859): at com.alexmercerind.mediakitandroidhelper.MediaKitAndroidHelper.openFileDescriptorJava(MediaKitAndroidHelper.java:43)
i tried libraries to convert the uri to file path
uri_content
uri_to_file
or other ways to get file of that : File.fromUri(uri)
but all of them trows exception.
is there any way to play that uri ?
That's a content URI, you don't have permissions to it (or haven't requested them). You must learn about Android development e.g. permissions, scoped storage, storage access framework etc. It's entirely separate topic of discussion.