Android Hide mouse pointer programmatically in my

2020-07-27 02:51发布

问题:

I know there is a similar question here: Moving mouse pointer on Android screen programatically but it doesn't seem to answer my needs (particularly because the answer was "not possible"!)

My client has an Android phone which is connected via some sort of bluetooth dongle to a wireless keyboard/trackpad. This is all working fine and I have written some software to react to keypresses. The problem is that the client is NOT interested in seeing a mouse cursor on the screen (this particular keyboard will have all except a few buttons covered up and will function as a remote control, the trackpad is inaccessible so the pointer sits in the middle of the screen uselessly).

So - is there any way for my app to get rid of the visible mouse pointer (either just for itself or for all cases, I don't care - this app is the only thing they want running on the phone). If I can't hide it can I move it to a corner, or can I change it to look like a plain white box instead of an arrow, or something else?

Any ideas would be greatly appreciated

Thanks

回答1:

So - is there any way for my app to get rid of the visible mouse pointer (either just for itself or for all cases, I don't care - this app is the only thing they want running on the phone). If I can't hide it can I move it to a corner, or can I change it to look like a plain white box instead of an arrow, or something else?

All of this may be possible with custom firmware. None of this is possible via the Android SDK.

You may be better served simply by replacing the "wireless keyboard/trackpad" with one that does not have a trackpad.