I am using Exoplayer in a new project to play audio and video files.
In the detail page I have put a button to play the file. The content string comes from a database field that was filled earlier using the content chooser.
When i press the play button i catch the Permission Denial error in the Exoplayer error event.
On the same detail page i have placed another button to start the content chooser. I press that button.
In the content chooser i tap on the same file.
Back in the detail page i check the filename again and it is the same string. Only now the exoplayer is ready to play.
I press the play button again and the exoplayer plays the file.
What does the content chooser do more that i don't do in the first instance?
Or in other words: how can i obtain access to the file?
Log details:
*** detail: B4XPage_Created [mainpage]
*** mainpage: B4XPage_Disappear [mainpage]
*** detail: B4XPage_Appear [mainpage]
content://com.android.providers.media.documents/document/audio%3A1624
Error: com.google.android.exoplayer2.upstream.Loader$UnexpectedLoaderException: Unexpected SecurityException: Permission Denial: opening provider com.android.providers.media.MediaDocumentsProvider from ProcessRecord{7abac20 27629:b4a.mymedia/u0a251} (pid=27629, uid=10251) requires that you obtain access using ACTION_OPEN_DOCUMENT or related APIs
** Activity (main) Pause event (activity is not paused). **
*** detail: B4XPage_Disappear [mainpage, detail]
sending message to waiting queue (OnActivityResult)
running waiting messages (1)
ContentDir
content://com.android.providers.media.documents/document/audio%3A1624
** Activity (main) Resume **
*** detail: B4XPage_Appear [mainpage, detail]
content://com.android.providers.media.documents/document/audio%3A1624
Ready
I use this exoplayer library (the zip file contains version 1.42)
I searched the community forums and found this thread. No replies on it.
Any suggestions?
In the detail page I have put a button to play the file. The content string comes from a database field that was filled earlier using the content chooser.
When i press the play button i catch the Permission Denial error in the Exoplayer error event.
On the same detail page i have placed another button to start the content chooser. I press that button.
In the content chooser i tap on the same file.
Back in the detail page i check the filename again and it is the same string. Only now the exoplayer is ready to play.
I press the play button again and the exoplayer plays the file.
What does the content chooser do more that i don't do in the first instance?
Or in other words: how can i obtain access to the file?
Log details:
*** detail: B4XPage_Created [mainpage]
*** mainpage: B4XPage_Disappear [mainpage]
*** detail: B4XPage_Appear [mainpage]
content://com.android.providers.media.documents/document/audio%3A1624
Error: com.google.android.exoplayer2.upstream.Loader$UnexpectedLoaderException: Unexpected SecurityException: Permission Denial: opening provider com.android.providers.media.MediaDocumentsProvider from ProcessRecord{7abac20 27629:b4a.mymedia/u0a251} (pid=27629, uid=10251) requires that you obtain access using ACTION_OPEN_DOCUMENT or related APIs
** Activity (main) Pause event (activity is not paused). **
*** detail: B4XPage_Disappear [mainpage, detail]
sending message to waiting queue (OnActivityResult)
running waiting messages (1)
ContentDir
content://com.android.providers.media.documents/document/audio%3A1624
** Activity (main) Resume **
*** detail: B4XPage_Appear [mainpage, detail]
content://com.android.providers.media.documents/document/audio%3A1624
Ready
I use this exoplayer library (the zip file contains version 1.42)
I searched the community forums and found this thread. No replies on it.
Any suggestions?