ModernCB Posted January 3, 2020 Share Posted January 3, 2020 When playing music via Bluetooth through my JVC car stereo, Poweramp ignores pause commands from the stereo. The stereo button is a single play/pause button that toggles playback. Pressing the button when music is paused causes it to play, but when playing it wont pause. When looking at the process bluetooth commands, the button press is recieved but the command from the psmediabuttonservice is ignored. All other bluetooth commands (back/next/call/play) work fine, and the play/pause toggle worked just fine until October. Samsung Galaxy A8, Android version 9, Poweramp build 853, JVC 820bt stereo (old). I imagine the problem is an update to how Poweramp handles bluetooth commands, but an update does more harm than good for me if it limits compatibility with my other equipment. Command log. 17.18.35.213 shows the ignore behavior. ================== 17:18:33.632 PSMediaButtonReceiver android.intent.action.MEDIA_BUTTON KEYCODE_MEDIA_PLAY ACTION_DOWN name=Virtual source=0x0 sources=0x301 virt=true repeat=0 actionTime=468616414 A2dpOn isAvrcp playerState=1 ================== 17:18:33.689 PSMediaButtonReceiver android.intent.action.MEDIA_BUTTON KEYCODE_MEDIA_PLAY ACTION_UP name=Virtual source=0x0 sources=0x301 virt=true repeat=0 actionTime=468616473 A2dpOn isAvrcp playerState=1 ================== 17:18:33.692 PlayerService RESUME from PSMediaButtonReceiver IGNORED ================== 17:18:35.077 PSMediaButtonReceiver android.intent.action.MEDIA_BUTTON KEYCODE_MEDIA_PLAY ACTION_DOWN name=Virtual source=0x0 sources=0x301 virt=true repeat=0 actionTime=468617859 A2dpOn isAvrcp playerState=1 ================== 17:18:35.207 PSMediaButtonReceiver android.intent.action.MEDIA_BUTTON KEYCODE_MEDIA_PLAY ACTION_UP name=Virtual source=0x0 sources=0x301 virt=true repeat=0 actionTime=468617990 A2dpOn isAvrcp playerState=1 ================== 17:18:35.213 PlayerService RESUME from PSMediaButtonReceiver IGNORED ================== 17:18:51.048 PSMediaButtonReceiver android.intent.action.MEDIA_BUTTON KEYCODE_MEDIA_PREVIOUS ACTION_DOWN name=Virtual source=0x0 sources=0x301 virt=true repeat=0 actionTime=468633832 A2dpOn isAvrcp playerState=1 ================== 17:18:51.136 PSMediaButtonReceiver android.intent.action.MEDIA_BUTTON KEYCODE_MEDIA_PREVIOUS ACTION_UP name=Virtual source=0x0 sources=0x301 virt=true repeat=0 actionTime=468633917 A2dpOn isAvrcp playerState=1 ================== 17:18:51.146 PlayerService PREVIOUS from PSMediaButtonReceiver ================== 17:18:53.249 PSMediaButtonReceiver android.intent.action.MEDIA_BUTTON KEYCODE_MEDIA_NEXT ACTION_DOWN name=Virtual source=0x0 sources=0x301 virt=true repeat=0 actionTime=468636033 A2dpOn isAvrcp playerState=1 ================== 17:18:53.424 PSMediaButtonReceiver android.intent.action.MEDIA_BUTTON KEYCODE_MEDIA_NEXT ACTION_UP name=Virtual source=0x0 sources=0x301 virt=true repeat=0 actionTime=468636207 A2dpOn isAvrcp playerState=1 ================== 17:18:53.495 PlayerService NEXT from PSMediaButtonReceiver ================== 17:19:00.303 PSMediaButtonReceiver android.intent.action.MEDIA_BUTTON KEYCODE_MEDIA_PLAY ACTION_DOWN name=Virtual source=0x0 sources=0x301 virt=true repeat=0 actionTime=468643086 A2dpOn isAvrcp playerState=1 ================== 17:19:00.500 PSMediaButtonReceiver android.intent.action.MEDIA_BUTTON KEYCODE_MEDIA_PLAY ACTION_UP name=Virtual source=0x0 sources=0x301 virt=true repeat=0 actionTime=468643284 A2dpOn isAvrcp playerState=1 ================== 17:19:00.510 PlayerService RESUME from PSMediaButtonReceiver IGNORED ================== 17:22:24.408 HeadsetPlugReceiver headset event disconnection BT=false am mode=0 no_keep_notif_on_dscn=false ================== 17:22:24.408 HeadsetPlugReceiver cmd_player_pause_playing ================== 17:22:24.651 BTReceiver headset event disconnection BT=true am mode=0 JVC Unit no_keep_notif_on_dscn=false ================== 17:28:28.749 BTReceiver headset event connection BT=true am mode=0 JVC Unit ================== 17:29:46.252 HeadsetPlugReceiver headset event disconnection BT=false am mode=0 no_keep_notif_on_dscn=false ================== 17:29:46.283 BTReceiver headset event disconnection BT=true am mode=0 JVC Unit no_keep_notif_on_dscn=false ================== 17:51:29.743 BTReceiver headset event connection BT=true am mode=0 JVC Unit ================== 17:57:44.213 BTReceiver headset event disconnection BT=true am mode=0 JVC Unit no_keep_notif_on_dscn=false ================== 17:57:44.228 HeadsetPlugReceiver headset event disconnection BT=false am mode=0 no_keep_notif_on_dscn=false ================== 18:14:07.739 BTReceiver headset event connection BT=true am mode=0 JVC Unit ================== 18:18:36.112 PSMediaButtonReceiver android.intent.action.MEDIA_BUTTON KEYCODE_MEDIA_PLAY ACTION_DOWN name=Virtual source=0x0 sources=0x301 virt=true repeat=0 actionTime=470211525 A2dpOn isAvrcp playerState=2 ================== 18:18:36.439 PSMediaButtonReceiver android.intent.action.MEDIA_BUTTON KEYCODE_MEDIA_PLAY ACTION_UP name=Virtual source=0x0 sources=0x301 virt=true repeat=0 actionTime=470211855 A2dpOn isAvrcp playerState=2 ================== 18:18:36.479 PlayerService RESUME from PSMediaButtonReceiver resumePlaying ================== 18:18:36.544 PlayerService RESUME from PSMediaButtonReceiver IGNORED ================== 18:30:53.478 BTReceiver headset event disconnection BT=true am mode=0 JVC Unit no_keep_notif_on_dscn=false ================== 18:30:53.478 BTReceiver cmd_player_pause_playing ================== 18:30:53.501 HeadsetPlugReceiver headset event disconnection BT=false am mode=0 no_keep_notif_on_dscn=false Link to comment Share on other sites More sharing options...
andrewilley Posted January 3, 2020 Share Posted January 3, 2020 Unfortunately your Bluetooth device is sending a KEYCODE_MEDIA_PLAY event, which is a specific command to start playback, not to pause it. To pause playback it should be sending KEYCODE_MEDIA_PAUSE, or if the event is intended to be a Play/Pause toggle function (which would appear to be the desired effect) then it should be sending KEYCODE_MEDIA_PLAY_PAUSE. See https://developer.android.com/reference/android/view/KeyEvent . The only way I can think of to work-around this issue with your BT device (if you can't get the manufacturer to fix it) would be if Max could add an option in PA's BT Settings area to deliberately misinterpret any PLAY, PAUSE or PLAY_PAUSE events as toggles. It would need to be an option though, as otherwise it would break functionality for devices which are sending those commands correctly. Andre Link to comment Share on other sites More sharing options...
ModernCB Posted January 4, 2020 Author Share Posted January 4, 2020 Thanks Andre. I figured it was something along those lines, but am still scratching my head a bit why it worked previously and then stopped working overnight. None of the hardware involved changed, the bluetooth command from my stereo didn't change, but something changed in either how my phone's bluetooth command service, or Poweramp, processed the command. Seems like someone tried to fix something that wasn't broken (Android or PA devs), and in the process broke it for me. Link to comment Share on other sites More sharing options...
luiramji Posted January 12, 2020 Share Posted January 12, 2020 Take a look at this Modern CB. http://support.powerampapp.com/knowledgebase/articles/323539-Poweramp-starts-resumes-on-its-own-or-pauses-in-ca Link to comment Share on other sites More sharing options...
andrewilley Posted January 12, 2020 Share Posted January 12, 2020 21 hours ago, luiramji said: Take a look at this Modern CB. That relates to headunits sending spurious commands (especially when initially connecting) which you can indeed tell Poweramp to ignore, But that won't help if the user wants their commands to be actioned, but the head-unit is sending the wrong command. Andre Link to comment Share on other sites More sharing options...
maxmp Posted January 13, 2020 Share Posted January 13, 2020 playerState=1 means STATE_PLAYING. Poweramp can't pause in response to RESUME command as most devices out of there will behave incorrectly with Poweramp then. This is why it's ignored. Link to comment Share on other sites More sharing options...
Unlogic Posted April 11, 2020 Share Posted April 11, 2020 I'm having the same issue as ModernCB. All older JVC stereos, cheap and expensive suffer from this bug where the play/pause button on the unit sends a PLAY command instead of the correct PLAY_PAUSE one. In my case I have a high end KD-R90BT model which I'm very fond of apart from this bug. Older versions of Android used to treat this PLAY command as PLAY_PLAUSE command so the bug wasn't noticable. But this changed a few years ago however it still worked in Poweramp up until recently. I realize that this is clearly a bug in the car stereo but JVC hasn't released a firmware update in 8 years for these units so it's highly unlikely that they'll fix this bug. Instead of purchasing a new car stereo just because of this bug I'd much rather pay the Poweramp team to add an option under the bluetooth settings to always treat the PLAY command as PLAY_PAUSE. I'm willing to pay 100$ in order to have this option added. Link to comment Share on other sites More sharing options...
andrewilley Posted April 11, 2020 Share Posted April 11, 2020 @maxmp Just a thought, but what about a user-configurable option (per Bluetooth device) to define how received BT commands should be processed (i.e. which BT commands to interpret as PLAY, PLAY_PAUSE, and PAUSE). I know it's the head-units that are at fault, but it would be a handy work-around that might improve some user experiences. Andre Link to comment Share on other sites More sharing options...
Unlogic Posted April 11, 2020 Share Posted April 11, 2020 That sounds like a great solution to work around the various BT bugs in these types of devices. My bounty still stands for that type of solution. As a long time Poweramp user it's painful having to use other inferior players just because of the AVRCP play/pause problem. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.