How to simulate a touch for any application in Android?

I know that some similar questions have already been asked, but I think they are asking to simulate a touch in their own applications, however I want to create an agent that can "use" any application.

So, what I want to achieve, I need to take as a series of inputs (touch: {x1, y1}, {x2, y2}, etc.) and manage any application (for example, Facebook) as if it were a real user touched this coordinate.

Is there any example or method for this? Or an existing question about this?

Thanks for any help!

Edit: I believe the solution, if one exists, is probably PC related. either connect my real Android device to a computer, or use an Android virtual device. However, virtual devices do not support Google Play, and I need to use some applications from Google Play.

+5
source share
4 answers

You can also try Robotium (where you programmatically, in Java, mouse buttons, etc.) or MonkeyRunner (to send random user interface events).

+2
source

You can use robotium for programming (in java) to click on any button or on any coordinates on the screen. Its easy to configure and use.

+1
source

Have you tried Selendroid? http://selendroid.io/

I have not tried it myself, I only know about this because I use Selenium for web applications.

Selenium is able to simulate a series of input events. For this purpose, you can either work with coordinates or with DOM elements (divs, buttons, textfields, etc.).

Your account should be exactly what was done for selendroid.

0
source

I had to look a bit for this. I also searched for this solution.

NO RETURNS REQUIRED FOR THIS: If you want to repeat the sequence of steps, for example, fill out the form, repeat the steps of the game because re-loading is boring, you can try: FREP Android application from the Play Store (link).

If you want to add conditional scenarios, for example, when you play Clash of Clans with home Wi-Fi, turn on the data automatically and turn off Wi-Fi (since Airtel Wifi in India is unpredictable and can make you free the clan war!), Macro Droid from Play Market.

You can also try: Mahiro Many applications are available based on Tasker , Automatic Input . Perhaps you can write code / write a macro to make a personal decision using this Tasker application.

0
source

Source: https://habr.com/ru/post/1201107/


All Articles