java - How to control mouse using Android sensors ? -
i have done client socket , server socket things. need use gravity sensors data move pc's mouse. how can access mouse java code ?
check out robot class here (http://docs.oracle.com/javase/7/docs/api/java/awt/robot.html) provides method called mousemove(int x, int y);
that wish.
working code:
public static void main(string[] args) throws exception { robot robot = new robot(); robot.mousemove(300, 550); }
now 'gravity sensors' speak of, you're going want tutorial on how use velocitytracker
provided android.
example: https://developer.android.com/training/gestures/movement.html
Comments
Post a Comment