每当按下“提高音量”按钮时,我都想在应用程序外部的特定位置单击。 所以我想到了创建一个Android应用程序,其服务将无限期在后台运行。每当按下“提高音量”按钮时,该服务将负责在屏幕上执行点击。 我需要代码帮助以在屏幕上的特定位置执行点击。 答案 0 :(得分:1) 我认为您不需要为此提供服务。只需收听提高音量按钮事件。看看这个Android How to listen for Volume Button events? 现在,关于定位单击点,您可以从中获取帮助
How do android screen coordinates work? 用于执行点击Is it possible to simulate a click on the screen in Android? 1 个答案: