G gunnarjonsson Member Licensed User Longtime User Apr 27, 2022 #1 Hi All! I have an app for Internet radio that also plays downloaded files. I use Exoplayer for this and it works perfectly. I recently bought BT earbuds and noticed that I need to be able to control the play and pause functions in my app from the mediabutton on the earbuds. I have searched the forum and tried many of the ideas but unfortunately I have not been able to make it work. Have someone found a solution to this that works for recent Android versions? Gunnar Jonsson
Hi All! I have an app for Internet radio that also plays downloaded files. I use Exoplayer for this and it works perfectly. I recently bought BT earbuds and noticed that I need to be able to control the play and pause functions in my app from the mediabutton on the earbuds. I have searched the forum and tried many of the ideas but unfortunately I have not been able to make it work. Have someone found a solution to this that works for recent Android versions? Gunnar Jonsson
H Hamied Abou Hulaikah Well-Known Member Licensed User Longtime User Apr 27, 2022 #2 You should think differently in this case, the bt earbuds buttons interact with android os, not directly with audio player program, so you search about INTENTS. In your case use ACTION_MEDIA_BUTTON and others related intents. What is intent? you can search this forum with alot of info, this one explanation Upvote 0
You should think differently in this case, the bt earbuds buttons interact with android os, not directly with audio player program, so you search about INTENTS. In your case use ACTION_MEDIA_BUTTON and others related intents. What is intent? you can search this forum with alot of info, this one explanation
Pendrush Well-Known Member Licensed User Longtime User Apr 27, 2022 #3 I don't think it is possible without using MediaSession. You can try PndAudioExoPlayer example app, to see is it working with yours BT earbuds. Upvote 0
I don't think it is possible without using MediaSession. You can try PndAudioExoPlayer example app, to see is it working with yours BT earbuds.
G gunnarjonsson Member Licensed User Longtime User Apr 28, 2022 #4 I have tried your app and it works with my BT earbuds. I can however not use it with downloaded files since it is only for streaming media. Gunnar Jonsson Upvote 0
I have tried your app and it works with my BT earbuds. I can however not use it with downloaded files since it is only for streaming media. Gunnar Jonsson