英文:
Moving mouse pointer on Android Studio
问题
我正在开发一个眼动跟踪应用程序,根据眼睛的坐标移动鼠标指针。
我成功地检测到了眼睛的坐标,但无法创建相应移动的鼠标指针。
我是Android开发的初学者,现在真的卡在这一点上。
为了澄清我的问题,我需要鼠标指针移动方式类似于 eva facial mouse,只是使用眼睛的坐标而不是面部坐标。
英文:
I am developing an eye-tracking application that moves a mouse pointer based on the coordinates of the eyes.
I successfully detected the coordinates of the eyes but wasn't able to create a mouse pointer that moves accordingly.
I am a beginner in Android development and I am really stuck at this point.
to clarify my question I need the pointer to move like on eva facial mouse except using the eyes coordinates instead of the faces.
答案1
得分: 0
我不认为我们有任何用于移动鼠标的API。Eva网站提到它会移动指针,就像“鼠标”一样。
我怀疑他们所做的是在辅助叠加层上绘制一个指针,然后使用AccessibilityService#dispatchGesture来模拟用户触摸屏幕。
英文:
I don't believe we have any APIs to move the mouse. The Eva site mentions that it moves a pointer "like a mouse".
I suspect what they are doing is drawing a pointer on an accessibility overlay, and then using AccessibilityService#dispatchGesture to simulate the user touching the screen.
专注分享java语言的经验与见解,让所有开发者获益!
评论