I am developing n android pp to control the mouse of a PC. I am almost done. The app have 4 buttons to control the movements of mouse. Its working for normal click.... But i want the mouse pointer to be moved continuously when i long press those button.... anyone have any idea....
I would take a look into the Android dragEvent. I haven't had any contact with it, but what I'm thinking is you could have an object on your screen that represents the mouse cursor, and use the dragEvent to move that object around the screen, while sending the X and Y values to the PC, to sync the mouse movement with your Android event.
Then you may want to override onKeyDown event and while the button is pressed do your thing. Also, this means you will have to poll for onKeyUp event to make sure the user doesn't take his finger off the button. Basically, you do your operation all the way between onKeyDown and onKeyUp events.
There is a thread on SO that may apply to your particular case here[^]
Full-fledged Java/.NET lover, full-fledged PHP hater. Full-fledged Google/Microsoft lover, full-fledged Apple hater. Full-fledged Skype lover, full-fledged YM hater.
Last Visit: 31-Dec-99 19:00 Last Update: 23-Feb-17 21:06