You can do the same thing as Monkey. You will however need to use private APIs, and it will only work when running as the shell user.
On Wed, Jul 21, 2010 at 1:14 PM, Matt Rusiniak <vost...@gmail.com> wrote: > Hi everyone, > > I'm trying to figure out a way to send touch events to the foreground > activity. Essentially I want to write something that allows me to run > it from the shell and just say "I touched this co-ordinate", so that I > can automate some UI tasks for testing. Essentially what Monkey does, > but application agnostic. > > I think that android.view.MotionEvent holds the key, but I'm not sure > how to run something without view so that I don't interfere with what > is on the screen. Perhaps with a service, but I'm unclear how that > would work. > > Does anyone have any ideas? > > Thanks, > Matt > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en