Control UI - Click & Drag?

Post your questions and help other users.

Moderator: Martin

Post Reply
DivinityCycle
Posts: 5
Joined: 20 Mar 2014 16:58

Control UI - Click & Drag?

Post by DivinityCycle » 03 Apr 2014 09:33

As I dig deeper into all the crazy stuff Automagic is capable of, I started messing around with Control UI.
I have found one instance where I kindof "need" to do a "click & drag" input, but I don't see any way to do this in the current dev build.
Is emulation of such an input possible, and if so, can Automagic do that at the moment?

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

Re: Control UI - Click & Drag?

Post by Martin » 04 Apr 2014 10:05

That's not possible using Control UI. Maybe you can simulate such input using a rooted device and action Execute Root Command: input swipe x1 y1 x2 y2 (input swipe 0 0 0 300 opens the notification drawer on a nexus 5). It depends on ROM version whether or not command input allows to simulate a swipe. To check this, execute the input-command without options and see the log and check the output of the command in the log.
You can find the coordinates on the screen by enabling option Pointer location in the developer settings of Android.

User avatar
Nerey
Posts: 102
Joined: 07 Mar 2014 16:59

Re: Control UI - Click & Drag?

Post by Nerey » 04 Apr 2014 18:27

Very interesting
It's sad, but my Android 4.0.4 have only input [text|keyevent]
Is there any other way to enter swipe or touch?
Last edited by Nerey on 10 Apr 2014 05:13, edited 1 time in total.
Sorry for bad english, my native is russian.

DivinityCycle
Posts: 5
Joined: 20 Mar 2014 16:58

Re: Control UI - Click & Drag?

Post by DivinityCycle » 10 Apr 2014 02:07

Martin, very interesting! I actually do indeed use rooted devices and I will try out this particular method ASAP. The flow I was working on is kindof hacky to begin with, so executing click-drags via root seems like par for the course.

Are the screen X/Y co-ordinates very device specific? I figured that would be the limiting factor in sharing such a flow.

User avatar
MURTUMA
Posts: 697
Joined: 05 Mar 2013 22:43

Re: Control UI - Click & Drag?

Post by MURTUMA » 10 Apr 2014 05:50

The xy-coordinates are screen resolution specific. From developer settings enable pointer location option and you can get the exact coordinates.

Post Reply