Hi Martin,
you created "Media Button" trigger and it works just fine with recently purchased Xiaomi Key (like Pressy but waaay much cheaper).
Could you please add similar CONDITION? So I cold check whether the button is pressed at this particular moment or not?
Unless such condition does exist already and I'm missing that somehow.
And the second issue I hit - it looks like pretty much any player react to that event and leave no chances to Automagic to handle the event by itself.
Is it possible to override that so ideally Automagic would get the event first and, once it does its job, pass the event down to other apps (or not pass) - something similar to how SMS are being handled currently.
Thanks!
"Media Button" _condition_
Moderator: Martin
Re: "Media Button" _condition_
Hi,
Some ROMs send the pressed and released event at the same time to apps even when the button was pressed for a certain duration so there's no way to create a condition. I'm not sure if this applies to all ROMs or only to newer versions of Android.
Maybe it would be possible to handle the system events directly with a trigger Command Output and command getevent and store the press/release events of a button in a global variable. This requires a rooted device and is too risky to support with a built-in trigger or condition.
The second issue is caused by the design of the Android media button feature, which only sends the events to the last registered media button receiver. You can try to mitigate this issue by executing an action Reregister Media Button Receiver from time to time. You could handle the event in Automagic and use an action Control Audio Player: Media Buton and use option send to specified app to control one specific app.
Regards,
Martin
Some ROMs send the pressed and released event at the same time to apps even when the button was pressed for a certain duration so there's no way to create a condition. I'm not sure if this applies to all ROMs or only to newer versions of Android.
Maybe it would be possible to handle the system events directly with a trigger Command Output and command getevent and store the press/release events of a button in a global variable. This requires a rooted device and is too risky to support with a built-in trigger or condition.
The second issue is caused by the design of the Android media button feature, which only sends the events to the last registered media button receiver. You can try to mitigate this issue by executing an action Reregister Media Button Receiver from time to time. You could handle the event in Automagic and use an action Control Audio Player: Media Buton and use option send to specified app to control one specific app.
Regards,
Martin
Re: "Media Button" _condition_
Thanks if your recommendations, Martin. I will try and report back how it works.