Page 1 of 1

Double fingers swipe

Posted: 22 May 2018 14:23
by xpdev
Hi

there is a way to simulate double fingers swipe ?

Thank you

Re: Double fingers swipe

Posted: 22 May 2018 14:46
by Desmanto
I wish to know too, but for pinch to zoom in/out, using root command input x y or similar. Looking at stackoverflow : https://stackoverflow.com/questions/253 ... -using-adb
There are method to convert the touch event to sendevent. But I still don't get it. My pinch to zoom create so many event to convert. Doesn't work when I try to replicate it in sendevent.

Re: Double fingers swipe

Posted: 22 May 2018 15:09
by xpdev
I need it to expand notification on Miui rom but i think it's the same for pinch to zoom in/out

Re: Double fingers swipe

Posted: 22 May 2018 16:12
by Desmanto
You mean the quick setting and notification? You can try Control UI : notifications() or quickSettings().
Try to execute it directly to see if it pulls down.

Re: Double fingers swipe

Posted: 23 May 2018 06:30
by xpdev
Yes, with notifications() i open the window (for quicksettings and where appears notifications)

The trouble is expand the first notification, in Miui Rom i need to do a swipe from the center notification with 2 fingers, one to left and one to right..... this is a crazy way to expand notifications.... but this is on miui roms

Any idea how simulate the swipe ?

thank you

Re: Double fingers swipe

Posted: 23 May 2018 10:32
by Desmanto
What MIUI version and android base does the phone have? If you are using nougat based, you can try to use Control UI > Show Overlay Control > Gesture and emulate the swipe. You can also try Set App Notification Priority, see if that works. But you have to set it back to off if you don't need it expands everytime.

AFAIK this should be done directly from xposed for MIUI. Try to find some module similar to gravitybox (i never use MIUI before), and force the notification to be expanded. But this will make permanent expanded notification, every notification from that app will always expanded.

If you need to do it on certain event (example for certain keyword), then the best way is to mirror the notification and recreate it in Automagic but use expanded version, Priority : maximum, use big message. So incoming notif, catch it, remove it and pass all the variables to another new notification from automagic but in expanded version.

I think it is possible for automagic to expand the notification. Maybe we can request if "Perform Action on Notification on Statusbar" can have new Action Type to "Expand Notification".

Re: Double fingers swipe

Posted: 24 May 2018 18:39
by Martin
Hi,

You can also try to simulate swipe input with action Control UI. Click the red Gesture button and simulate the two-finger-swipe. I highly recommend to record the gesture on the greenish area, then click Optimize and Keep Start/End point only to reduce the number of recorded points to a minimum of two coordinates per finger, then press OK and paste the prepared function call to the scripting area. I also recommend to reduce the second parameter of the swipe gesture to a short value like 30 (millis) so the script would look something like this:

Code: Select all

touchGesture(0, 30, newList(500, 0, 500, 2000),
                              0, 30, newList(1000, 0, 1000, 2000));
The function call can be read like this:
Simulate a touch gesture with two simultaneous swipes (hence two lines with a list of coordinates to simulate for each finger). Both fingers start the gesture with an offset of 0 milliseconds and end the gesture at 30 milliseconds. The first finger starts at x=500, y=0 and swipes down to coordinate x=500 and y=2000. The second finger starts at x=1000, y=0 and swipes down to coordinate x=1000 and y=2000.

Regards,
Martin

Re: Double fingers swipe

Posted: 25 May 2018 09:54
by xpdev
Thank you, i'll do some tests