trigger android hardware event from a service
Is it possible to trigger a hard开发者_高级运维ware event from a service? At the very least, I'm hoping to emulate trackball movements and clicking events such that an active app will process them normally.
Many thanks.
I don' think so and certainly hope not. That would be a serious security issue.
If you are just testing with JUnit etc then this is possible with the instrumentation classes.
精彩评论