Android HU: Diff btwn Mouse click and Automagic Click(XY)

General discussions about Automagic and automation in general

Moderator: Martin

Post Reply
jmuhammad
Posts: 8
Joined: 13 Dec 2015 21:15

Android HU: Diff btwn Mouse click and Automagic Click(XY)

Post by jmuhammad » 26 Dec 2015 19:40

Greetings Martin et al,

I am hoping you can shed some light on my problem.

I have an Android radio head unit in my car. The HU is designed with two main boards: one MCU board handles non-Android functions such as DVD, video/audio switching, radio tuner and front panel button support. The other board is a processor board (SoM - System on Module) containing the Rockchip SoC (System on Chip), RAM, flash memory, and an audio CODEC commonly mounted behind the front LCD screen. It is this SoM which runs the Android OS (presently KitKat 4.4.4).

Here is my problem: The MTCRadio.apk is the AM/FM radio tuner app. There are two onscreen buttons that activate the SEEK+ and SEEK- (or SEARCH+/-) functions which search for next/prev strongest station. These functions are not mapped to any front panel hard buttons. Obviously if you touch them with your fingers they work. I set up Automagic to click on the coordinates of those buttons. I can see that the buttons are clicked on because the button element changes colors just as it does when you press it with your fingers. But it does not work. It is as if you have to touch the physical screen for the HU to recognize an input.

EXCEPT...if I connect a mouse to my radio and click on two onscreen button elements with the arrow cursor it works! So what is the difference between a mouse cursor clicking on an element and the Automagic Click(XY) function clicking on it?

jmuhammad
Posts: 8
Joined: 13 Dec 2015 21:15

Re: Android HU: Diff btwn Mouse click and Automagic Click(XY

Post by jmuhammad » 27 Dec 2015 00:44

On the MTCRadio app:
I am able to use Automagic (using input tap or swipe x y execute root command) to click any of the 6 shown (per screen) radio presets buttons and it works.
I am able to use Automagic (using input tap or swipe x y execute root command) to click the stereo (ST) button and it works.

But it will not work on the SEEK+ or SEEK- buttons even though I can see the element is activated. Why are these two buttons so different than any other???

(holds down for 800mS):
Launch App: Radio
Wait: 2 second
Run Shell: input swipe 910 270 910 270 800

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Android HU: Diff btwn Mouse click and Automagic Click(XY

Post by Martin » 29 Dec 2015 19:43

Hi,

Clicking a button using click(x, y) uses the accessibility features of the device to 'simulate' the click. It's not really simulating touch screen input with mouse down/mouse up events but directly asks the button to execute the action that should be invoked on the click event. The app you are using might use regular buttons that properly change visual state on the click event but actually only execute the seek on mouse down/mouse up events.

I would have guessed that the input swipe variant would also work on the seek buttons, strange if it does not. Maybe use an app like RepetiTouch that supports recording the actual input when you control the app manually and then replay the input.

Regards,
Martin

jmuhammad
Posts: 8
Joined: 13 Dec 2015 21:15

Re: Android HU: Diff btwn Mouse click and Automagic Click(XY

Post by jmuhammad » 29 Dec 2015 22:09

Martin, thanks for the explanation.

BTW, I had even tried a longer swipe (using a different x e.g. input swipe 905 270 915 270 800)...didn't work.

1) Can/will Automagic implement mouse up/down?
2) Can/will Automagic implement export to apk (standalone app)? This is really desired as it is mostly the only reason I have to hang on to my Tasker as a secondary app but I hate its interface.
3) I just looked at RepetiTouch; it will probably work but I will have to buy the Pro version and at $11.99 it is quite expensive...especially for my limited use and need. Also I still have to use Tasker, the Locale plugin, and I may be able to export it with AppFactory and use it with Automagic. Quite a kluge.

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Android HU: Diff btwn Mouse click and Automagic Click(XY

Post by Martin » 04 Jan 2016 19:49

1) Unlikely since it requires root, is quite device specific and probably requires a lot of support.
2) I have not decided this yet but it's not very likely to be honest. Maybe I will create a special runtime-Automagic that will allow to execute flows and stuff but will not allow to create new flows.
3) Also check out the plugin AutoInput. It's probably cheaper and sounds like it also supports recording input but I have not tested this myself so I'm not sure if it really works that way.

Post Reply