Android 6 automation
Moderator: Martin
Android 6 automation
I'm trying to automate an app that requires me to swipe down on the screen to refresh. Is there any way to do this on Android version 6?
Re: Android 6 automation
You have to find other method to trigger the refresh, probably input key F5 or there is button to refresh it. Otherwise, you have to use execute root command, input swipe.
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.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Re: Android 6 automation
I have tried to Control UI do do the same thing in the past. It was a fail.robchoc wrote:I'm trying to automate an app that requires me to swipe down on the screen to refresh. Is there any way to do this on Android version 6?
Re: Android 6 automation
Looks like this is something that can't be done, thanks for the replies.
Re: Android 6 automation
Execute root command with: input swipe x1 y1 x2 y2, where x1 y1 x2 y2 are coordinates of the direction you would like to swipe.
Re: Android 6 automation
Is this a possibility to replicate gesture to swipe down.
Do a long click at a certain point and before it has had a chance to finish the click then do another one a pixel down and keep going like this so that it looks like the press never left the touchscreen?
Do a long click at a certain point and before it has had a chance to finish the click then do another one a pixel down and keep going like this so that it looks like the press never left the touchscreen?
Re: Android 6 automation
So far, it seems there is no way to do it without that input swipe. That's why I want to upgrade to nougat phone above, when I still have Lollipop 5.1. (currently already using Oreo 8.1). While newer android introduce new restriction, but it also introduce new feature.
Better try to find another way to trigger the refresh event. You can try to connect usb or bluetooth keyboard and try to press F5, check whether the app respond to that key or not. You can also try to find the activity inside the app using start activity, to see if there is specific intent that can trigger the refresh.
Better try to find another way to trigger the refresh event. You can try to connect usb or bluetooth keyboard and try to press F5, check whether the app respond to that key or not. You can also try to find the activity inside the app using start activity, to see if there is specific intent that can trigger the refresh.
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.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Re: Android 6 automation
I tried the Bluetooth Keyboard and F5 did not refresh.
I'm interested in the second part of your reply about finding a possible intent using start activity, how do you use this action to do this?
I'm interested in the second part of your reply about finding a possible intent using start activity, how do you use this action to do this?
Re: Android 6 automation
App's activity is undocumented territory, only available if the dev of app publicly announce it. Somehow we can find the hidden activities, but not guaranteed.
Use action Start Activity, Action : android.intent.action.MAIN. Tick the explicit component and find the app. Then find the class name, search for something related to refresh, retrieve, sync or its kind. If you can't find it, you can try to search in the action Start Service or Send Broadcast. As it is impossible to check for all app, I can't guarantee it will work, just a possible workaround.
Use action Start Activity, Action : android.intent.action.MAIN. Tick the explicit component and find the app. Then find the class name, search for something related to refresh, retrieve, sync or its kind. If you can't find it, you can try to search in the action Start Service or Send Broadcast. As it is impossible to check for all app, I can't guarantee it will work, just a possible workaround.
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.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.