Double fingers swipe

Post your questions and help other users.

Moderator: Martin

Post Reply
User avatar
xpdev
Posts: 59
Joined: 16 Sep 2014 06:20
Location: Italy

Double fingers swipe

Post by xpdev » 22 May 2018 14:23

Hi

there is a way to simulate double fingers swipe ?

Thank you
Xiaomi MI 6

Rom Miui 10 EU STABLE

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

Re: Double fingers swipe

Post by Desmanto » 22 May 2018 14:46

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.
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
xpdev
Posts: 59
Joined: 16 Sep 2014 06:20
Location: Italy

Re: Double fingers swipe

Post by xpdev » 22 May 2018 15:09

I need it to expand notification on Miui rom but i think it's the same for pinch to zoom in/out
Xiaomi MI 6

Rom Miui 10 EU STABLE

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

Re: Double fingers swipe

Post by Desmanto » 22 May 2018 16:12

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.
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
xpdev
Posts: 59
Joined: 16 Sep 2014 06:20
Location: Italy

Re: Double fingers swipe

Post by xpdev » 23 May 2018 06:30

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
Xiaomi MI 6

Rom Miui 10 EU STABLE

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

Re: Double fingers swipe

Post by Desmanto » 23 May 2018 10:32

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".
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
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Double fingers swipe

Post by Martin » 24 May 2018 18:39

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

User avatar
xpdev
Posts: 59
Joined: 16 Sep 2014 06:20
Location: Italy

Re: Double fingers swipe

Post by xpdev » 25 May 2018 09:54

Thank you, i'll do some tests
Xiaomi MI 6

Rom Miui 10 EU STABLE

Post Reply