4

I want to create an application that takes coordinates of the device screen and simulates a finger-click on that spot. Is there a way to do such a thing through code?

prgDevelop
  • 1,557
  • 2
  • 15
  • 26

2 Answers2

2

You can call onClick on specific views if that's good for You.

View v;// or any of your view that extends View(ImageView, TextView etc...)
v.performClick();//API 1 //you can use this with longClick aswell
v.callOnClick();//API 15
//see documentation for these methods
Sipka
  • 2,291
  • 2
  • 27
  • 30
2

check monkeyrunner

You can remotely execute touch events on an Android device using the monkeyrunner api.

stinepike
  • 54,068
  • 14
  • 92
  • 112