Simulating touches onto an activity of another application

与世无争的帅哥 提交于 2019-12-07 04:01:24

Yes it is, if your app is signed with the platform certificate you may use the INJECT_EVENTS permission and inject events on any application:

http://developer.android.com/reference/android/Manifest.permission.html#INJECT_EVENTS

It is not possible. This would be cause for major security concern. You can use the Instrumentation APIs to inject events into your own Activities, but you cannot inject events into any Activities that are not your own.

The ability to do so would make it trivial to circumvent the necessity for user interaction to do certain things (i.e. install/uninstall apps).

If you want to be able to do it you'll have to modify the system on your own device to enable it.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!