Reputation: 105
How to get x and y coordinates of mouse over.
I have a service in android and which is connected to .net application via eneter messaging framework. I wants x and y position of mouse from service. I want mouse positions not only on clicks but also on mouse over.
Many thanks
Upvotes: 1
Views: 3389
Reputation: 2615
You can also use Android x86 in Live CD mode (or install it in dual-boot with Windows).
Upvotes: 0
Reputation: 1292
Maybe not a best solution but atleast it works. Both solutions are based on Genymotion emulator.
Depends on how long you wait before you do step 3, android can appear in genymotion or virtual box window.
Run VirtualBox app, go to your virtual box "android emulator":
Settings -> Display -> Remote Display -> Check Enable Server
Connect to your virtualbox with:
$ rdesktop -a 16 localhost:3389
While you move cursor in rdesktop, you can see pointer in genymotion android emulator window. Now you can intercept hover events.
There is maybe a better solution - disable mouse integration for virtual machine, so, virtualbox can grab mouse cursor, like:
$ VBoxManage modifyvm "your-vm-name" --mouse ps2
but it doesn't work for me, maybe genymotion launcher overrides settings on every launch?
Links: http://developer.android.com/reference/android/view/View.OnHoverListener.html
p.s. hover events are available starting from api 14.
Upvotes: 3