W woodpecker Member Licensed User Longtime User Aug 20, 2018 #1 I managed to get the headset intents code from this thread to work on my Android 5 phone, now I have an Android 8 phone I don't get any events from the headset button, the app runs and shows starter service running on the screen but it never gets the media button actions. https://www.b4x.com/android/forum/threads/mediasessions.62525/page-3#post-396317 The log doesn't show any errors, has something changed in Android 8 that would stop it working.
I managed to get the headset intents code from this thread to work on my Android 5 phone, now I have an Android 8 phone I don't get any events from the headset button, the app runs and shows starter service running on the screen but it never gets the media button actions. https://www.b4x.com/android/forum/threads/mediasessions.62525/page-3#post-396317 The log doesn't show any errors, has something changed in Android 8 that would stop it working.
Erel B4X founder Staff member Licensed User Longtime User Aug 21, 2018 #2 See this: https://stackoverflow.com/questions/45960265/android-o-oreo-8-media-buttons-issue Try to play something when you start your app. Upvote 0
See this: https://stackoverflow.com/questions/45960265/android-o-oreo-8-media-buttons-issue Try to play something when you start your app.
W woodpecker Member Licensed User Longtime User Aug 21, 2018 #3 Erel said: See this: https://stackoverflow.com/questions/45960265/android-o-oreo-8-media-buttons-issue Try to play something when you start your app. Click to expand... Thanks Erel, all I had to do was initialize a mediaplayer, start and stop it instantly and it works fine! Code: MediaPlayer1.Play MediaPlayer1.Stop Upvote 0
Erel said: See this: https://stackoverflow.com/questions/45960265/android-o-oreo-8-media-buttons-issue Try to play something when you start your app. Click to expand... Thanks Erel, all I had to do was initialize a mediaplayer, start and stop it instantly and it works fine! Code: MediaPlayer1.Play MediaPlayer1.Stop