Chrisubuntu Posted August 24, 2020 Share Posted August 24, 2020 Use case: Some Bluetooth devices (headphones/speakers) have dedicated Rewind/Fast Forward buttons (to not confuse with Next/Previous buttons). Additionnally, apps like this (https://play.google.com/store/apps/details?id=flar2.homebutton) allow to assign Volume buttons or assistant buttons (Samsung Bixby or LG assistant buttons) to rewind/fast forward. I always assumed that this only worked for Podcast/Audiobooks apps, but it works for many music players like Gonemad, Playerpro, Musicolet. So adding this would be useful when listening to long audio tracks in Poweramp. Link to comment https://forum.powerampapp.com/topic/19767-support-rewindfast-forward-commands-from-remote-devices/ Share on other sites More sharing options...
andrewilley Posted August 24, 2020 Share Posted August 24, 2020 As long as those buttons generate long-press key events of KEYCODE_MEDIA_REWIND and KEYCODE_MEDIA_FAST_FORWARD, Poweramp should process them accordingly. Andre Link to comment https://forum.powerampapp.com/topic/19767-support-rewindfast-forward-commands-from-remote-devices/#findComment-88995 Share on other sites More sharing options...
Chrisubuntu Posted August 24, 2020 Author Share Posted August 24, 2020 Apparently, PA does receive the command (there's a beep sound) but nothing happens. It did rewind a couple of times, but not anymore. Link to comment https://forum.powerampapp.com/topic/19767-support-rewindfast-forward-commands-from-remote-devices/#findComment-89000 Share on other sites More sharing options...
andrewilley Posted August 24, 2020 Share Posted August 24, 2020 What does Settings > Headset/Bluetooth > Last Processed Commands show? (you can paste the results here if you like) Andre Link to comment https://forum.powerampapp.com/topic/19767-support-rewindfast-forward-commands-from-remote-devices/#findComment-89001 Share on other sites More sharing options...
maxmp Posted August 24, 2020 Share Posted August 24, 2020 Poweramp v3 does support media seek commands (no need to configure anything) and also the volume keys (search settings for volume keys) assignment. Thanks! Link to comment https://forum.powerampapp.com/topic/19767-support-rewindfast-forward-commands-from-remote-devices/#findComment-89005 Share on other sites More sharing options...
Chrisubuntu Posted August 24, 2020 Author Share Posted August 24, 2020 ================== 20:27:56.023 PSMediaButtonReceiver android.intent.action.MEDIA_BUTTON KEYCODE_MEDIA_REWIND ACTION_DOWN name=Virtual source=0x0 sources=0x301 virt=true repeat=0 actionTime=35653104 playerState=1 ================== 20:27:56.026 PSMediaButtonReceiver android.intent.action.MEDIA_BUTTON KEYCODE_MEDIA_REWIND ACTION_UP name=Virtual source=0x0 sources=0x301 virt=true repeat=0 actionTime=35653104 playerState=1 ================== 20:27:56.029 PlayerService BEGIN_REWIND from PSMediaButtonReceiver ================== 20:27:56.029 PlayerService END_FAST_FORWARD from PSMediaButtonReceiver ================== 20:28:02.098 PSMediaButtonReceiver android.intent.action.MEDIA_BUTTON KEYCODE_MEDIA_REWIND ACTION_DOWN name=Virtual source=0x0 sources=0x301 virt=true repeat=0 actionTime=35659179 playerState=1 ================== 20:28:02.101 PSMediaButtonReceiver android.intent.action.MEDIA_BUTTON KEYCODE_MEDIA_REWIND ACTION_UP name=Virtual source=0x0 sources=0x301 virt=true repeat=0 actionTime=35659179 playerState=1 ================== 20:28:02.104 PlayerService BEGIN_REWIND from PSMediaButtonReceiver ================== 20:28:02.104 PlayerService END_FAST_FORWARD from PSMediaButtonReceiver ================== 20:28:04.804 PSMediaButtonReceiver android.intent.action.MEDIA_BUTTON KEYCODE_MEDIA_REWIND ACTION_DOWN name=Virtual source=0x0 sources=0x301 virt=true repeat=0 actionTime=35661885 playerState=1 ================== 20:28:04.807 PSMediaButtonReceiver android.intent.action.MEDIA_BUTTON KEYCODE_MEDIA_REWIND ACTION_UP name=Virtual source=0x0 sources=0x301 virt=true repeat=0 actionTime=35661885 playerState=1 ================== 20:28:04.808 PlayerService BEGIN_REWIND from PSMediaButtonReceiver ================== 20:28:04.809 PlayerService END_FAST_FORWARD from PSMediaButtonReceiver ================== 20:28:47.381 PSMediaButtonReceiver android.intent.action.MEDIA_BUTTON KEYCODE_MEDIA_REWIND ACTION_DOWN name=Virtual source=0x0 sources=0x301 virt=true repeat=0 actionTime=35704461 playerState=1 ================== 20:28:47.385 PSMediaButtonReceiver android.intent.action.MEDIA_BUTTON KEYCODE_MEDIA_REWIND ACTION_UP name=Virtual source=0x0 sources=0x301 virt=true repeat=0 actionTime=35704461 playerState=1 ================== 20:28:47.386 PlayerService BEGIN_REWIND from PSMediaButtonReceiver ================== 20:28:47.387 PlayerService END_FAST_FORWARD from PSMediaButtonReceiver ================== 20:28:51.003 PSMediaButtonReceiver android.intent.action.MEDIA_BUTTON KEYCODE_MEDIA_REWIND ACTION_DOWN name=Virtual source=0x0 sources=0x301 virt=true repeat=0 actionTime=35708084 playerState=1 ================== 20:28:51.006 PlayerService BEGIN_REWIND from PSMediaButtonReceiver ================== 20:28:51.007 PSMediaButtonReceiver android.intent.action.MEDIA_BUTTON KEYCODE_MEDIA_REWIND ACTION_UP name=Virtual source=0x0 sources=0x301 virt=true repeat=0 actionTime=35708084 playerState=1 ================== 20:28:51.008 PlayerService END_FAST_FORWARD from PSMediaButtonReceiver ================== 20:29:03.232 PSMediaButtonReceiver android.intent.action.MEDIA_BUTTON KEYCODE_MEDIA_REWIND ACTION_DOWN name=Virtual source=0x0 sources=0x301 virt=true repeat=0 actionTime=35720313 playerState=1 ================== 20:29:03.235 PSMediaButtonReceiver android.intent.action.MEDIA_BUTTON KEYCODE_MEDIA_REWIND ACTION_UP name=Virtual source=0x0 sources=0x301 virt=true repeat=0 actionTime=35720313 playerState=1 ================== 20:29:03.238 PlayerService BEGIN_REWIND from PSMediaButtonReceiver ================== 20:29:03.238 PlayerService END_FAST_FORWARD from PSMediaButtonReceiver ================== 20:29:06.531 PSMediaButtonReceiver android.intent.action.MEDIA_BUTTON KEYCODE_MEDIA_REWIND ACTION_DOWN name=Virtual source=0x0 sources=0x301 virt=true repeat=0 actionTime=35723612 playerState=1 ================== 20:29:06.533 PSMediaButtonReceiver android.intent.action.MEDIA_BUTTON KEYCODE_MEDIA_REWIND ACTION_UP name=Virtual source=0x0 sources=0x301 virt=true repeat=0 actionTime=35723612 playerState=1 ================== 20:29:06.535 PlayerService BEGIN_REWIND from PSMediaButtonReceiver ================== 20:29:06.535 PlayerService END_FAST_FORWARD from PSMediaButtonReceiver ================== 20:29:10.326 PSMediaButtonReceiver android.intent.action.MEDIA_BUTTON KEYCODE_MEDIA_REWIND ACTION_DOWN name=Virtual source=0x0 sources=0x301 virt=true repeat=0 actionTime=35727408 playerState=1 ================== 20:29:10.328 PSMediaButtonReceiver android.intent.action.MEDIA_BUTTON KEYCODE_MEDIA_REWIND ACTION_UP name=Virtual source=0x0 sources=0x301 virt=true repeat=0 actionTime=35727408 playerState=1 ================== 20:29:10.331 PlayerService BEGIN_REWIND from PSMediaButtonReceiver ================== 20:29:10.332 PlayerService END_FAST_FORWARD from PSMediaButtonReceiver Link to comment https://forum.powerampapp.com/topic/19767-support-rewindfast-forward-commands-from-remote-devices/#findComment-89007 Share on other sites More sharing options...
Chrisubuntu Posted August 24, 2020 Author Share Posted August 24, 2020 Seems like the first command is successful but subsequent ones fail. Then after a pause and resume, it works once then fail afterwards. Link to comment https://forum.powerampapp.com/topic/19767-support-rewindfast-forward-commands-from-remote-devices/#findComment-89008 Share on other sites More sharing options...
andrewilley Posted August 24, 2020 Share Posted August 24, 2020 The problem is that your button activity is generating a momentary click action - ACTION DOWN is immediately followed by ACTION_UP. FFwd and Rewind need the button to provide a press-and-hold action, and the fwd/rew activity will then continue until the button is released again. Andre Link to comment https://forum.powerampapp.com/topic/19767-support-rewindfast-forward-commands-from-remote-devices/#findComment-89009 Share on other sites More sharing options...
maxmp Posted August 24, 2020 Share Posted August 24, 2020 Right, seems @Chrisubuntu device sends short presses. What is the device in question? I guess for these some pre-defined seek jump may be defined (e.g. 10 sec). Unfortunately all my test BT devices with seek buttons sends long clicks (seek starts and continues while button is pressed and ends when button is released), so I need to get the device which sends short commands for the testing. Link to comment https://forum.powerampapp.com/topic/19767-support-rewindfast-forward-commands-from-remote-devices/#findComment-89010 Share on other sites More sharing options...
Chrisubuntu Posted August 25, 2020 Author Share Posted August 25, 2020 @maxmp. I'm using a Samsung Galaxy Note 9 on Android 10 and I remapped the Bixby button (using the app I linked in the original post) to rewind. I also remapped the volume button (double press) to rewind with same results, so you could test using that if you don't have a phone with the Bixby button. Link to comment https://forum.powerampapp.com/topic/19767-support-rewindfast-forward-commands-from-remote-devices/#findComment-89034 Share on other sites More sharing options...
andrewilley Posted August 25, 2020 Share Posted August 25, 2020 As I said, Rewind is a press-and-hold feature, it is designed to continue to wind backwards for as long as the button is held (it also increases in speed the longer the button is held down by the way). Your app seems to be sending the effect of a single-press (i.e. click or tap) on a KEYCODE_MEDIA_REWIND button, which won't do anything useful as it would stop winding as soon as it starts. @maxmp I wonder if it might be worth interpreting single-click KEYCODE_MEDIA_REWIND and KEYCODE_MEDIA_FAST_FORWARD events as 10-second jumps? Andre Link to comment https://forum.powerampapp.com/topic/19767-support-rewindfast-forward-commands-from-remote-devices/#findComment-89040 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.