在Android Studio上移动鼠标指针。

huangapple 未分类评论52阅读模式
英文:

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.

huangapple
  • 本文由 发表于 2020年4月5日 22:59:28
  • 转载请务必保留本文链接:https://java.coder-hub.com/61044576.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定