I have one linux laptop and one android tablet. I want to show my mouse movement in my android tablet that is i will move mouse in linux laptop and that movement will be shown on android tablet.Will libgdx will work for this??Is their any good study material or sample program to start ?
Asked
Active
Viewed 280 times
1
-
I guess you will be connected with wire to your tablet, in that case you can simply project your mouse coordinates to tablet screen coordinates, and inject them with `adb shell sendevent`. [Related question](http://stackoverflow.com/q/8647826/2549281) – Dabo Apr 29 '14 at 10:59
-
no,mouse will be connected to laptop only.Android tablet and laptop will be connected using wi-fi direct.and now when i move mouse,it should show movement in tablet – Srb Apr 29 '14 at 11:10
-
2As @Dabo said you need to project your mouse coordinates to tablet screen coordinates. This means you need to calculate the position on the tablet out of the resolution of tablet, position on linux and resolution on linux version. Then draw a mouse there. – Robert P Apr 29 '14 at 14:29
1 Answers
0
There was a Libgdx Remote project, but that went in the other direction (pushing Android sensor data to your desktop so you can debug tilt code on your desktop). However, I believe that's been deprecated in the most recent builds.
The remnants of that project are the RemoteInput
and RemoteSender
classes. You may be able to adapt those for your case (setting up your Android device to be a network listener may be more work than forwarding mouse events).
This approach may be much lower-level than what you want (you may just want to get mouse coordinates from your laptop and map them directly to drawing something on the screen -- and not inject low-level events).

P.T.
- 24,557
- 7
- 64
- 95