Headphone-Jack-Switch
Moderator: Martin
- schuster666
- Posts: 52
- Joined: 13 Nov 2013 14:03
- Location: Germany / Neuss
Headphone-Jack-Switch
Hi Martin,
is it possible to use this kind of switch to run a flow or set a variable?
can you make it happen?
greatings
is it possible to use this kind of switch to run a flow or set a variable?
can you make it happen?
greatings
-- the world would be better without people--
-- but boring --
-- but boring --
Re: Headphone-Jack-Switch
Take a look at the trigger Wired Headset Plugged. You can react when it is plugged or unplugged.
- schuster666
- Posts: 52
- Joined: 13 Nov 2013 14:03
- Location: Germany / Neuss
Re: Headphone-Jack-Switch
OK, here is a photo of the plug. it is not reachable in AM.
any hint?
any hint?
- Attachments
-
- 20150915_171822.jpg (660.87 KiB) Viewed 25833 times
-- the world would be better without people--
-- but boring --
-- but boring --
Re: Headphone-Jack-Switch
I believe there were a discussion about that thing or something similar in the past. I can't remember any relevant keyword to find that topic, but maybe you can find it with the product name?
Re: Headphone-Jack-Switch
You could try trigger Media Button Event to see if Automagic detects the button. Action Reregister Media Button Receiver could be required when media players are handling the events..
Re: Headphone-Jack-Switch
Please share your result with us, I´d be interested to hear if you managed to get it to work with automagic.
Re: Headphone-Jack-Switch
Hi,
although I didn´t get any feedback, I decided to get one of those headphone buttons myself.
It was not the first time that I had considered buying one and as you can get them for about 3 euros now, there was nothing to loose.
My intention was to use automagic to give the button the desired functions, instead of using one of the available apps (ikey, keycut, ...).
And what can I say - it works like a charm!
I now have a neat little hardware button to turn on the flashlight. And of course only when the screen is unlocked, nothing is too close to the proximity sensor and with an auto turn off after 3 minutes - I just love Automagic!
It even allows you to give a different function to a long click (at least on the galaxy S4), by using the "Speech web search requested".
I´d like to say thanks to Martin for this great app!
There is one problem though - the phone obviously goes into headphone mode,when a headphone button is plugged in. So there is no sound, apart from incoming calls.
Is there any way to turn that mode off with automagic?
although I didn´t get any feedback, I decided to get one of those headphone buttons myself.
It was not the first time that I had considered buying one and as you can get them for about 3 euros now, there was nothing to loose.
My intention was to use automagic to give the button the desired functions, instead of using one of the available apps (ikey, keycut, ...).
And what can I say - it works like a charm!
I now have a neat little hardware button to turn on the flashlight. And of course only when the screen is unlocked, nothing is too close to the proximity sensor and with an auto turn off after 3 minutes - I just love Automagic!
It even allows you to give a different function to a long click (at least on the galaxy S4), by using the "Speech web search requested".
I´d like to say thanks to Martin for this great app!
There is one problem though - the phone obviously goes into headphone mode,when a headphone button is plugged in. So there is no sound, apart from incoming calls.
Is there any way to turn that mode off with automagic?
Re: Headphone-Jack-Switch
I'm not aware about an official way to prevent that the button is detected as a headset. Actually I would be interested to know how Pressy and similar apps try to workaround this problem. Does the app SoundAbout work on your device?
Re: Headphone-Jack-Switch
I would also love to know how the pressy app can recognize that it´s a pressy and not a headphone that´s plugged in.
But I was not looking for a way to prevent the headphone button from being detected as a headset - I think that would be very difficult. I was rather looking for a way of manually switching between headphones connected / disconnected. I came across Soundabout, but it requests too many permissions for my taste and has too many other functions that I don´t need.
I ended up using HF Button Widget, which works perfectly, even under lollipop (at least on my S4). It´s only function is to switch the headphone mode on / off.
The only downside is that it´s a widget, so I can´t launch it through automagic (control UI would be the only way I can think of, but not very practical). That´s why I was hoping that there might be a way to do the switch through automagic.
Maybe that would be an interesting feature to implement in the future, as automagic could then be used as an awesome alternative for all those pressy like apps.
By the way, would there be a way to make automagic distinguish between a single/double/triple click, like those other apps do?
Like that you could assign loads of different functions to the button. I tried the execution count condition, but I couldn´t figure out how to prevent it from triggering the single execution when you press twice.
But I was not looking for a way to prevent the headphone button from being detected as a headset - I think that would be very difficult. I was rather looking for a way of manually switching between headphones connected / disconnected. I came across Soundabout, but it requests too many permissions for my taste and has too many other functions that I don´t need.
I ended up using HF Button Widget, which works perfectly, even under lollipop (at least on my S4). It´s only function is to switch the headphone mode on / off.
The only downside is that it´s a widget, so I can´t launch it through automagic (control UI would be the only way I can think of, but not very practical). That´s why I was hoping that there might be a way to do the switch through automagic.
Maybe that would be an interesting feature to implement in the future, as automagic could then be used as an awesome alternative for all those pressy like apps.
By the way, would there be a way to make automagic distinguish between a single/double/triple click, like those other apps do?
Like that you could assign loads of different functions to the button. I tried the execution count condition, but I couldn´t figure out how to prevent it from triggering the single execution when you press twice.
Re: Headphone-Jack-Switch
An Xposed mod "xposed additions" allows to override hardware buttons. I'm not sure if it works with media buttons, but everything else works flawlessly. I have it even run some flows when pressing some key combination. If you feel safe to install Xposed framework to your device, you should give it a try.