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
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.
Related
I am working on a game app. Like all game apps, it renders two side-by-side views. I would like to support using a bluetooth or OTG mouse in my app. So, I need to hide the normal mouse pointer.
I have done a bit of searching, but can not seem to figure out how to do this. I did find something that says Android 7.0 is getting a new API for custom pointers:
http://www.androidpolice.com/2016/06/16/android-n-gets-support-custom-mouse-pointers-via-new-api-dev-preview-4/
That's great, and would probably allow me to make a blank custom pointer.
But I need this to work on my current hardware with Android 6. And I know it's possible, because the other device does hide the mouse pointer.
Any tips or tricks to achieve this would be most welcome.
My android watch has a single hardware (physical) button on the side. Is it possible to program a listener for this button, so that it can be used as an additional control in my program?
I don't believe this is possible. The usual way to detect a standard button press (like Back) in Android is with an onKeyDown listener, and this doesn't fire in an Activity on Wear when the stem button is pressed (tested on both Wear 1.5 and the 2.0 dev preview).
It's always iffy to assert something is categorically not possible, because there's always the chance that someone will find a clever hack to make it happen. And I wouldn't mind being proved wrong. But until such a hack comes along, I'm going to say no, it's not.
I'm using ARC Welder to turn my Android app into a Chrome OS app. Most of it works perfectly, except that text selection with a mouse behaves like it would on a touch device, requiring long-clicking or double-clicking on words, and then dragging the ends. Is there a way around this?
As CommonsWare points out, this is the Android behavior.
Feel free to file a bug even for a feature request.
We are open to allowing the behavior to be changed, but it also seems like something that should be left up to the end user (how do they expect to interact with an Android app on a Chromebook?)
I have a Geniatech ATV1220 android set top box running android 4.2.2 and am using an arduino with motion sensor connected to it to modify content on a website when someone is in front of the sensor via NodeJS.
This works great, but what I would like to do is to manipulte the complete system viewport of the android system. For example if someone steps in front of the sensor, the whole system should be displayed in a reduced size like 1/4 original at the bottom right side of the screen while the other area should just display black or basically nothing.
It is really hard to find something because of the pretty common keywords like display, viewport, size and so on. I could probably do it dependent on individual applications but I also want to use it in third party applications, which I cannot modify.
Currently I am sometimes using commands like this:
echo 1 >/sys/class/graphics/fb0/blank
to modify the actual content that is displayed, in this case it all turns black/blank and I wonder if there is a similar way to achieve what I want to do. Any help is greatly appreciated.
What worked in the end was using the Xposed Framework and installing "One-handed mode" like explained here: How to get a one-handed mode on almost any rooted Android device.
What I want to achieve here is to shrink all of the Android's OS UI (everything inclusive) to use only 70-80% of the screen.
The reason is that I wish to have my area to put in whatever I want - apps icons which exist and are always visible (no matter if I am in a browser, or playing angry bird etc).. its like Windows's quick launch or Mac's dock which always stays there . I can also put some important text that I wish to see throughout my interaction with the device or anything else.
I just want to use 20-30% of the screen-size all by myself and run Android on the remaining portion of the screen.
Do you think it is possible? If so, can you please give me pointers?
Thanks much,
Rohan
There are two solutions for me:
1) create custom Android build. Change WindowManager code a little.
2) create own virtual keyboard which will serve keyboard and your stuff (http://developer.android.com/reference/android/inputmethodservice/InputMethodService.html)