1

I need to automatically click on a specific button on an app. Is there a way to do this on a completely controlled environment?

By controlled environment, I mean the phone could be rooted, it could be connected to a desktop machine, any external app could be installed, and any other requirement.

Note: the button is NOT on an exposed activity.

  • This reads like a development question. This site is for users of Android, which means that questions about development/programming are off-topic here (see the What topics can I ask about here?). Development questions are on-topic on Stack Overflow. – wbogacz Jan 12 '18 at 15:05
  • 1
    Yes, the "Accessibility Services" can do that. However Google is planning to remove apps from PlayStore that use this service for controlling other apps for a different reason than helping disabled persons. – Robert Jan 12 '18 at 16:15
  • There are also applications for this and lot of other commands for rooted phones. – Alchimista Jan 20 '18 at 12:16
0

You can use adb command to simulate touch

adb shell input tap x y

where x y are the co-ordinates of the pixels on the screen to be tapped.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.