Fast Forward and Rewind Media Events
Moderator: Martin
Fast Forward and Rewind Media Events
I'm trying to intercept all the media button events from a certain headset. All media button events are caught and doing fine with all music players, but when Automagic is the default media receiver, it only catches play, next and previous. Fast forward and rewind options are there (at least experimentally) but don't get intercepted by Automagic. Is this a known bug? I've tried it on multiple phones with no luck. Is there a possible work around?
Love the app, it has been very useful for me and my team.
Thanks.
Love the app, it has been very useful for me and my team.
Thanks.
Re: Fast Forward and Rewind Media Events
Hi,
The media buttons are handled all in the same way in Automagic. Maybe your headset or device does not send regular media button events but uses another method to control the sound players.
Could you please enable Debug Log in Automagic, press fast forward/rewind and see if Automagic logs anything in menu->Manage->Log?
Does it make a difference when you use an action Sound with option Request audio focus: Normal before?
Are you using a regular wired headset or a bluetooth headset. What Android device and Android version are you using?
Regards,
Martin
The media buttons are handled all in the same way in Automagic. Maybe your headset or device does not send regular media button events but uses another method to control the sound players.
Could you please enable Debug Log in Automagic, press fast forward/rewind and see if Automagic logs anything in menu->Manage->Log?
Does it make a difference when you use an action Sound with option Request audio focus: Normal before?
Are you using a regular wired headset or a bluetooth headset. What Android device and Android version are you using?
Regards,
Martin
Re: Fast Forward and Rewind Media Events
Automagic does not log anything when I press fast forward/rewind. It logs regular MEDIA_BUTTON actions for play/previous/next. I even started playback, registered automatic again, and then did fast forward/rewind and still nothing in the log. It's a bluetooth headset with Android 4.4 running on a Samsung Tab S, LG Nexus 5, LG G3, Nexus 7, and a few other phones.
Doesn't seem to make a difference using the Sound action.
Doesn't seem to make a difference using the Sound action.
Re: Fast Forward and Rewind Media Events
Perhaps the fast forward is handled by a RemoteControlClient but not the regular media button stuff, but that's just a guess. I have ordered another BT headset so I hope I can reproduce this problem in a few days.
Do you have access to adb or could you capture a system log with system settings->Developer options->Take bug report right after you have sent a few fast forward commands to a music player that supports the buttons?
Do you have access to adb or could you capture a system log with system settings->Developer options->Take bug report right after you have sent a few fast forward commands to a music player that supports the buttons?
Re: Fast Forward and Rewind Media Events
Here are two bug reports from a Samsung Tab S and a LG Nexus 5. The Nexus bug report is the first one, the one with the date in the title. I can see the AVRCP commands for fast forward and rewind being sent, but I'm not sure from there. I verified our device sends AVRCP commands for all the media functions, but I did see some Samsung remote control stuff floating around in the 2nd bug report.
https://www.mediafire.com/?hr99jk75hz22m3i
https://www.mediafire.com/?hr99jk75hz22m3i
My company is open to working together more closely and providing compensation if there are features we need in the future.
https://www.mediafire.com/?hr99jk75hz22m3i
https://www.mediafire.com/?hr99jk75hz22m3i
My company is open to working together more closely and providing compensation if there are features we need in the future.
Re: Fast Forward and Rewind Media Events
Thanks for the bug reports. Unfortunately I can not directly see how the fast forward is sent to the app/receiver, I suspect that some BT specific code might be required to make the fast forward/rewind buttons work.
I will have to debug this on my own device and see if I can find what the other audio players are doing to receive the events.
I will have to debug this on my own device and see if I can find what the other audio players are doing to receive the events.
Re: Fast Forward and Rewind Media Events
Finally was able to reproduce this problem. Android indeed does not send the fast forward and rewind media buttons as regular media button events but Android handles the buttons from the BT headset on its own and forwards the button presses to the active RemoteControlClient. Automagic currently does not register itself as a RemoteControlClient since this has the side effect that Automagic would also appear like a media player on the lock screen (at least on some versions of Android). This could also be a good thing so I think that I will extend the trigger to optionally support this feature. Unfortunately it requires quite a bit of work to properly support a RemoteControlClient in Automagic and probably also requires a few new actions to update the state of the simulated media player (cover art, playing position, display text, available controls etc.) so I will add it to the todo-list but I can not give an estimate when this feature will become available.
Re: Fast Forward and Rewind Media Events
Wow that's awesome. Great job. Let me know when you get round to it, or when it goes on the EAP.
Re: Fast Forward and Rewind Media Events
Any updates on fast forwarding? My wired headset only has one button. Trying to execute fast forwarding on the Smart Audiobook app.
Re: Fast Forward and Rewind Media Events
Sorry, no news about this. I'll try to increase the priority a bit but there are also many other things on the todo list so I can not give an ETA.
Regards,
Martin
Regards,
Martin