Need help with non-working gesture

jrk.online

New member
Hello.
I am trying to copy reward codes from an app using macrodroid. I need to do this on a regular basis and so trying to automate it.
Step 1: Launch app (this will present the user with login/register screen)
Step 2: Choose Login option
Step 3: Enter username and password (upon login, the user will be presented with four tabs)
Step 4: Choose the rewards tab
Step 5: Search for a text - this text identifies the reward link
Step 6: Click on the text (link)

What am I trying to achieve?
After step 4, I need to scroll down a few times until I see the reward that I am interested in. This scrolling is implemented in screenshot3. I try scrolling up to 10 times. When I find the text, I break out of the loop.

What is actually happening?
When I use gesture to move the page upwards, the page does not scroll up! If I scroll it up myself, Step 5 and Step 6 are executed perfectly. It is only the gesture that is not working.

Make and model of phone: OnePlus 9
Android: 13
Accessibility settings:
Macrodroid: On
Macrodroid Fingerprint gesture detector: On, Shortcut: On, tried with shortcut off too
Macrodroid UI Interaction: On, Shortcut: On, tried with shortcut off too

Any suggestions on how I can get the gesture working please?
 

Attachments

  • Screenshot_2024-01-05-09-47-31-49_2e840d222d67ef3caca3a1c67d71d48f~3.jpg
    Screenshot_2024-01-05-09-47-31-49_2e840d222d67ef3caca3a1c67d71d48f~3.jpg
    265.7 KB · Views: 8
  • Screenshot_2024-01-05-09-47-40-41_2e840d222d67ef3caca3a1c67d71d48f~2.jpg
    Screenshot_2024-01-05-09-47-40-41_2e840d222d67ef3caca3a1c67d71d48f~2.jpg
    247.4 KB · Views: 8
  • Screenshot_2024-01-05-09-48-00-00_2e840d222d67ef3caca3a1c67d71d48f~2.jpg
    Screenshot_2024-01-05-09-48-00-00_2e840d222d67ef3caca3a1c67d71d48f~2.jpg
    206.8 KB · Views: 7
  • Screenshot_2024-01-05-09-48-10-11_2e840d222d67ef3caca3a1c67d71d48f~3.jpg
    Screenshot_2024-01-05-09-48-10-11_2e840d222d67ef3caca3a1c67d71d48f~3.jpg
    197.7 KB · Views: 8

dhj49er

Well-known member
Have you tried different values in your gesture action?

I would expect the X value to the same for the start and end points

1 sec is a Very long time for a swipe.

I would reduce to 250 ms

Finally the difference in y values - the length of the swipe - might need tweaking, as this will affect how big a scroll (together with the time)

Trying different values until you get the screen to scroll like your manual scroll.
 

jrk.online

New member
Have you tried different values in your gesture action?

I would expect the X value to the same for the start and end points

1 sec is a Very long time for a swipe.

I would reduce to 250 ms

Finally the difference in y values - the length of the swipe - might need tweaking, as this will affect how big a scroll (together with the time)

Trying different values until you get the screen to scroll like your manual scroll.
Thanks for your response.
Yes, I did try with short and long range on the Y axis. Also tried with equal and unequal X coordinates. I have tried changing the time interval from 200ms to a second. No luck :
(
 

dhj49er

Well-known member
Thanks for your response.
Yes, I did try with short and long range on the Y axis. Also tried with equal and unequal X coordinates. I have tried changing the time interval from 200ms to a second. No luck :
(
When you say no luck what does that mean?

Every combination of x & y and all durations you tried resulted in no gesture?

I would be interested in seeing an example of a no luck gesture.
 

jrk.online

New member
When you say no luck what does that mean?

Every combination of x & y and all durations you tried resulted in no gesture?

I would be interested in seeing an example of a no luck gesture.
Here is a video clip that I recorded. As you can see at the beginning of the clip, the gesture config is Start(425, 2000), End(425, 500), Time(250ms). (Please note that I have obscured the login details in the video clip.)
The actions of the macro do this: Launch the app, choose login option, enter credentials and log on, choose the rewards tab. But then the next step that the gesture should be doing - dragging the page up to see the lower portion of the page, does not work!

 
Last edited:

dhj49er

Well-known member
So no gesture works.

What does the system log show at the time of the gesture action?

What are the max values of x & y on your phone?

Have you tried a significantly different set of gesture values?

Starting at 2000 could be too near the bottom edge of the screen.

The 2000-500 is likely to be nearly a full screen swipe - something I think you never do manually.

Look what you do manually and configure the gesture to do the same.

Try a shorter gesture 1500 to 500

Make sure none of the X y Values are on the fingerprint sensor, if your phone has an under screen sensor.

Try the gesture in a separate macro to see if it works on another app.

These are typically the step I would perform to get a swipe gesture to work correctly.
 

jrk.online

New member
So no gesture works.

What does the system log show at the time of the gesture action?

What are the max values of x & y on your phone?

Have you tried a significantly different set of gesture values?

Starting at 2000 could be too near the bottom edge of the screen.

The 2000-500 is likely to be nearly a full screen swipe - something I think you never do manually.

Look what you do manually and configure the gesture to do the same.

Try a shorter gesture 1500 to 500

Make sure none of the X y Values are on the fingerprint sensor, if your phone has an under screen sensor.

Try the gesture in a separate macro to see if it works on another app.

These are typically the step I would perform to get a swipe gesture to work correctly.
I have already tried those alternatives... (a) ensured x is not too close to the edge of the screen (b) ensured that y is neither too low on the screen nor too high on the screen (c) shortened the gesture in a single line perpendicular to x-axis and also. It is after trying out those options, that I posted the problem here on the forum.
 

dhj49er

Well-known member
Have you tried a simple macro to check gesture action?

Launch app - needs app that opens with scrollable screen eg email app.
Wait 1s
Gesture action - try different lengths and durations.

If there is no gesture there is an issue with MD, perhaps with permissions, as the above macro works fine in my device.

Also you haven't said what is in the system log when the gesture action fails. Probably easiest to attach a screenshot of the log.
 

jrk.online

New member
Have you tried a simple macro to check gesture action?

Launch app - needs app that opens with scrollable screen eg email app.
Wait 1s
Gesture action - try different lengths and durations.

If there is no gesture there is an issue with MD, perhaps with permissions, as the above macro works fine in my device.

Also you haven't said what is in the system log when the gesture action fails. Probably easiest to attach a screenshot of the log.
Thank you for the response.

The logs did not indicate anything abnormal! I'll now try this via their web interface rather than the app.

I haven't yet tested the gesture with another app. Will try that too.
 

jrk.online

New member
Have you tried a simple macro to check gesture action?

Launch app - needs app that opens with scrollable screen eg email app.
Wait 1s
Gesture action - try different lengths and durations.

If there is no gesture there is an issue with MD, perhaps with permissions, as the above macro works fine in my device.

Also you haven't said what is in the system log when the gesture action fails. Probably easiest to attach a screenshot of the log.
Hello again. Here is a test that I ran.

A macro that launches Gmail and runs a gesture on it. There's no response to the gesture!

The video clip has the macro details, gesture configuration, failing gesture test and the corresponding System log.

To me it looks like MD's gesture is not working!

Trigger: Empty Trigger
Actions: Launch Gmail app, UI Interaction-Gesture

Gesture Configuration: Start-x=450, Start-y=1700, End-x=450, End-y=800, Duration=250ms


 
Last edited:

jrk.online

New member
Insert a wait, i.e. 1 sec, before the gesture action, in the test macro and try
Thank you. The wait helped!

So, I think it's the rewards app that is not responding to gestures. That's a shame, the app responding to human gesture but not automatic one!
 

kenp

New member
Came here looking to get a "Click" gesture to work. Trying to automate "join waitlist" of the electric car chargers at my workplace.

All automations work file, except the last click on "Join Waitlist"

Any inputs will be much apprecaited.

The macro:

unnamed (8).png

This macro launches the app and moves the location to my workplace.

unnamed (10).png

The last UI Interaction is for the macro to click "Join Waitlist" does not work. I have tried it with alternate x,y coordinates as well. (99,99/100,100/150,150 etc).


unnamed (11).png

That last UK clicked times out as I was trying to capture some values. The app itself captured the location of the button at 99,99.

Thanks
kenp
 

dhj49er

Well-known member
You need a wait action between the last 2 UI interaction actions.

The lack of a wait is the reason the last click action fails.
 

kenp

New member
thank you @dhj49er ! a followup question - to help me troubleshoot. Is there a method for me to determine the correct location of the option that needs to be clicked on?

I may create an automation that captures the x and y coordinates in variables? any alternate way?

I have introduced a pause ... but still not working and would like to validate that the click location is correct.
 

kenp

New member
Ok an update for all. Working now.
1. Thanks to @dhj49er for the tip on a wait. That helped the previous action to complete.
2. The click location was also incorrect. To find the exact click point, opened a screen shot of the app in GIMP on the computer, scaled the image to the correct pixel count (x,y) and hovered the cursor on the image in GIMP to get the exact x,y pixel count.

... and bingo!

Now to see how the phone can do this past midnight, when I am fast asleep and the phone is locked.

Thank you all for your inputs.
 

hsurB

Well-known member
Ok an update for all. Working now.
1. Thanks to @dhj49er for the tip on a wait. That helped the previous action to complete.
2. The click location was also incorrect. To find the exact click point, opened a screen shot of the app in GIMP on the computer, scaled the image to the correct pixel count (x,y) and hovered the cursor on the image in GIMP to get the exact x,y pixel count.

... and bingo!

Now to see how the phone can do this past midnight, when I am fast asleep and the phone is locked.

Thank you all for your inputs.

Check how to enable developer settings in your phone and enable pointer location. Then you can check in real time x and y coordinates of your clicks and gestures.
You could also install macrodroid helper apk and that should be enough to toggle it through configuration screen of ui interaction action but I am not sure
 

dhj49er

Well-known member
Ok an update for all. Working now.
1. Thanks to @dhj49er for the tip on a wait. That helped the previous action to complete.
2. The click location was also incorrect. To find the exact click point, opened a screen shot of the app in GIMP on the computer, scaled the image to the correct pixel count (x,y) and hovered the cursor on the image in GIMP to get the exact x,y pixel count.

... and bingo!

Now to see how the phone can do this past midnight, when I am fast asleep and the phone is locked.

Thank you all for your inputs.
Unfortunately, the macro is unlikely to work with the phone locked.

The UI interaction actions need the screen on, which usually requires the phone to be unlocked.
 
Top