模拟触摸到的另一种应用的活动 [英] Simulating touches onto an activity of another application

查看:101
本文介绍了模拟触摸到的另一种应用的活动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能模仿从一个应用程序的触摸Android的事件到另一个应用程序?也许使用服务或 SYSTEM_ALERT 一种无形的活动属性,以获得输入触摸然后模拟他们的另一另一个活动应用程序,它是正下方你的应用程序的透明活动。这可能吗?

Is it possible to simulate touch events in Android from one app to another app? Perhaps use a service or an invisible activity with SYSTEM_ALERT property to receive the input touches then simulate them to another activity of another application which is directly below the transparent activity of your application. Is this possible?

[更新]

以FoamyGuy的回答考虑,是有可能有一个无形的 SYSTEM_ALERT 活动来过滤掉某些触摸事件?我知道你可以撤销输入的活动。是否有可能撤销选择性输入?或者,我还是要创建一个自定义ROM?

Taking FoamyGuy's answer into account, is it possible to have an invisible SYSTEM_ALERT activity to filter out certain touch events? I know you can revoke input for the activity. Is it possible to revoke selective input? Or do I still have to create a custom ROM?

推荐答案

的确是这样,如果你的应用程序与平台的证书签名,你可以使用INJECT_EVENTS许可,任何应用程序中注入事件:

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆