WAI
Status Update
Comments
gr...@kochaniak.com <gr...@kochaniak.com> #3
I created a trivial working app project demonstrating this problem at https://github.com/gregko/PlayerServiceSample . In the LogCat output one can see a message when a media button is pressed on a headset, when running on Android 5.x through 7.x. However it fails completely on Android 8 "Oreo".
dn...@google.com <dn...@google.com>
dn...@google.com <dn...@google.com> #4
Thank you for reporting this issue. For us to further investigate this issue, please provide the following additional information:
Device used
Which device did you use to reproduce this issue?
Steps to reproduce
What steps are needed to reproduce this issue?
Please let us know the reproduction steps for the app which you have shared in comment #3 .
Frequency
How frequently does this issue occur? (e.g 100% of the time, 10% of the time)
Expected output
What is the expected output?
Current output
What is the current output?
Device used
Which device did you use to reproduce this issue?
Steps to reproduce
What steps are needed to reproduce this issue?
Please let us know the reproduction steps for the app which you have shared in
Frequency
How frequently does this issue occur? (e.g 100% of the time, 10% of the time)
Expected output
What is the expected output?
Current output
What is the current output?
gr...@kochaniak.com <gr...@kochaniak.com> #5
The device I'm testing on is Nexus 6P, purchased directly from Google Play. The Android 8 build number that I currently have is OPR6.170623.013. Same issue was observed before on beta test build starting with OPP.
Steps to reproduce:
Build and install the trivial sample fromhttps://github.com/gregko/PlayerServiceSample .
While sample is running, connect a Bluetooth or wired headset with media buttons (Play/Pause button is tested in the sample).
Observe LogCat output. If run under Android 5 to 7 you will see that LogCat output indicating that MediaSessionCompat.Callback method onMediaButtonEvent() received the button event. On Android 8 there is nothing, no matter what one does. The media buttons are sent to previously used music player for example.
Frequency: 100%
Expected output: KEYCODE_MEDIA_PLAY output in LogCat window (with "MPS" log tag) every time the headset "Play/Pause" button is pressed. This works on Android 5 to 7 inclusive, fails on Android 8.
Current output: nothing on Android 8.
Steps to reproduce:
Build and install the trivial sample from
While sample is running, connect a Bluetooth or wired headset with media buttons (Play/Pause button is tested in the sample).
Observe LogCat output. If run under Android 5 to 7 you will see that LogCat output indicating that MediaSessionCompat.Callback method onMediaButtonEvent() received the button event. On Android 8 there is nothing, no matter what one does. The media buttons are sent to previously used music player for example.
Frequency: 100%
Expected output: KEYCODE_MEDIA_PLAY output in LogCat window (with "MPS" log tag) every time the headset "Play/Pause" button is pressed. This works on Android 5 to 7 inclusive, fails on Android 8.
Current output: nothing on Android 8.
gr...@kochaniak.com <gr...@kochaniak.com> #6
I solved the problem upon re-reading the "Android 8 behavior changes" Google post: "the system routes the event to the app that most recently played audio locally. The active status, flags, and playback state of a media session are not considered when determining which app receives media button events." I had to play a very brief silent sound with Media Player to route media buttons to my app.
THERE IS A PROBLEM HOWEVER: playing sound with Text-to-speech API does not make media player buttons active for a TTS app. I consider this a bug, as TTS app plays audio locally as well. Should I submit a separate bug report on this, or can you redirect the issue reported here to solve the TTS problem? Please advise.
THERE IS A PROBLEM HOWEVER: playing sound with Text-to-speech API does not make media player buttons active for a TTS app. I consider this a bug, as TTS app plays audio locally as well. Should I submit a separate bug report on this, or can you redirect the issue reported here to solve the TTS problem? Please advise.
dn...@google.com <dn...@google.com> #7
Please raise new bug for TTS issue.
We will close the current issue.
We will close the current issue.
gr...@kochaniak.com <gr...@kochaniak.com> #8
The new bug report with updated app sample demonstrating it is filed under https://issuetracker.google.com/issues/65344811
Description