How to programmatically control the mouse cursor, without hardware mouse attached in android?

2

I have an Android device and an app which should move the mouse cursor programmatically.

When I have an Bluetooth or USB mouse attached to the device, I can send events to /dev/input/event7 to move the mouse and send button events, but when I disconnect the mouse, /dev/input/event7 disappears and I can't send events anymore.

I'm new to this and I'd like to know if there is a way to create a 'virtual' mouse that can handle these events, or any other solution that will help me reach my goal.

Leon van Noord

Posted 2015-03-09T10:35:03.623

Reputation: 121

android.stackexchange.com or androidcentral forums may be good other places to ask. Or if you're writing the app yourself then stackoverflow is great. – barlop – 2015-03-09T10:37:10.423

I thought it wasn't really android specific, since the input devices are kernel level. I mentioned Android to give some context. – Leon van Noord – 2015-03-09T10:44:37.120

You have a point, in which case know that it's also possible to make a question directed to linux users without mentioning android, to do so I suggest you grab a linux machine and or linux virtual machine and try to send events to /dev/input/event7 and see if it makes a difference if a mouse is attached. There are so many linux fanatics that might know. But that's more for the future if you don't get an answer to this one – barlop – 2015-03-09T10:50:52.970

I just had a thought, have you tried searching for virtual mouse in linux e.g. http://stackoverflow.com/questions/16482260/using-linux-virtual-mouse-driver

– barlop – 2015-03-09T10:52:25.263

No answers