views:

190

answers:

1

is it possible to have a service (A) which will launch an activity (B) and then periodically capture B's screen?

also, is it possible to send onTouch events from A to B?

basically, i'd like to make a bot which would use an application so i don't have to.

i guess it's not possible but had to ask.

A: 

You can't do that across Activitys but you could create a view that held the Activity that you want to automate. Then periodically you can grab the ViewDecorator and do some processing on it and then inject touch events.

CaseyB
Ummm...really? I'm unconvinced that's even possible within your own application, and I am inferring that that OP as interested in controlling another application.
CommonsWare
yes, i'm interested in controlling another activity which is not mine. don't have the source code for it or anything.btw, can't find anything about ViewDecorator in android.
discoHR