use hardware buttons on a BT device as a trigger

Post your questions and help other users.

Moderator: Martin

Post Reply
User avatar
tsolignani
Posts: 187
Joined: 12 Jan 2019 11:53
Location: Vignola, Mo, Italy
Contact:

use hardware buttons on a BT device as a trigger

Post by tsolignani » 26 Dec 2019 22:23

Good night everyone.

Say I have a Bose Bluetooth headphones with 3 hardware buttons.

How do I use them, if possible, as triggers into automagic?

Currently, I am using the button on my Amazfit Bip, but via an app which has a plugin for automagic, Amazfit Tools, so that's simple. There are no apps, to my knowledge, for Bose headphones with automagic / Tasker plugins.

Thank you.

Micky Micky
Posts: 179
Joined: 16 Oct 2019 17:38

Re: use hardware buttons on a BT device as a trigger

Post by Micky Micky » 27 Dec 2019 13:29

"The trigger Media Button Event (Experimental) executes a flow when the system detects a media button event, for example when the play-button is pressed on a headset.

Warning: When an audio player is launched, future events are usually sent to the audio player and not to Automagic anymore. If this is not the desired behaviour, Automagic has to be registered to receive the events again using an action Reregister Media Button Receiver."



It worked for me but I found it unreliable because of reregistering issue explained above. Youtube was causing the problem.

Hope this helps.

PS
I don't know Italian, but saying "Good night everyone" is like saying "Buenas noches" instead of "Buenas tardes" in Spanish.
"Good evening" is correct until midnight.
Crude but it works.

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: use hardware buttons on a BT device as a trigger

Post by Desmanto » 28 Dec 2019 20:11

@tsolignani : Trigger Media button event is one way to do it, as stated by Micky. The other way is to use logcat, which is far more complicated.

I found amazfit or mi band very limited. That's why i bought wearOS last time. It supports widget and allow me to control far more things than using bluetooth headset/mi band. Look at here : https://forum.xda-developers.com/wear-o ... c-t3956264
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

User avatar
tsolignani
Posts: 187
Joined: 12 Jan 2019 11:53
Location: Vignola, Mo, Italy
Contact:

Re: use hardware buttons on a BT device as a trigger

Post by tsolignani » 29 Dec 2019 11:50

Thank you, I'll do some tries.

I have a Samsung Galaxy Active 2 coming, I don't like it but it was somehow a gift so I'll see what I can do with it.

Thanks again.

Micky Micky
Posts: 179
Joined: 16 Oct 2019 17:38

Re: use hardware buttons on a BT device as a trigger

Post by Micky Micky » 29 Dec 2019 15:05

Samsung watches run Tizen OS not Wear OS.
Automagic doesn't work with Tizen.
Crude but it works.

User avatar
tsolignani
Posts: 187
Joined: 12 Jan 2019 11:53
Location: Vignola, Mo, Italy
Contact:

Re: use hardware buttons on a BT device as a trigger

Post by tsolignani » 29 Dec 2019 21:03

I know they run Tizen and automagic doesn't handle it, I just wonder if I could use the hardware buttons somehow.

Right now, I am using automagic with my Amazfit Bip which doesn't run wear either and it works really good, through Amazfit Tools plugin I can launch several flows according to how many times I push the hardware button and where I am located at the moment (f.i. if I am at the gym the double press launches a timer, otherwise when I'm home): with just one button you can make wonder.

Micky Micky
Posts: 179
Joined: 16 Oct 2019 17:38

Re: use hardware buttons on a BT device as a trigger

Post by Micky Micky » 29 Dec 2019 21:37

I see what you mean. You'll have to test it.

Happy new year to you.
Crude but it works.

User avatar
tsolignani
Posts: 187
Joined: 12 Jan 2019 11:53
Location: Vignola, Mo, Italy
Contact:

Re: use hardware buttons on a BT device as a trigger

Post by tsolignani » 30 Dec 2019 00:15

Thank you, as well!

Post Reply