[Think Tank] adding mouse cursor controlled by realative finger movement - Nexus One Android Development

I was impressed by the way the mouse cursor is controlled in the Remote Desktop application called "Xtralogic Remote Desktop Client for Android"
It uses what I am referring to here as "touch based relative cursor control" to allow you to control the mouse movements when connected to your remote desktop PC.
"Touch based relative cursor control" means that where ever you touch the screen, you are moving the mouse. Its basically like layering a transparent touchpad on top of the screen. Your finger doesn't have to be right on top of the cursor for it to work...
here is a video from their website to illustrate what i'm talking about:
I think that this could be very handy for certain things in android like browsing the internet.
the folks over at android-x86.org already have the code to add cursor support to android, their source code is freely available.
so here is what I would like to see:
-relative touch cursor
-for use in android browser (or other parts of the OS)
-while in browser, can be controlled via some sort or swiping gesture, menu option, or triple clicking
I just wanted to get a feeling on how the xda community would be open to such an idea, and maybe see if it sparks the interest of any devs (since my android coding skills are relativity limited at the moment.).

Good idea, but you're not the first to mention this.. i just hope some one make this happen

This would be great as an option for interacting with flash apps that rely on mouse hover.

Related

[Q] Using mouse with right click under android

Hello everybody,
I have an Iconia A500, running with Jelly Bean / rooted, Cyanogenmod 4.1.2 from Randomblame.
So far so good. As most of you know, this device supports bluetooth mice and USB mice. I am using both kinds of mice quite often for working in office tools or for the good old ScummVM games.
Now to my question. Every mouse I use only has the left click function. Right click does the same as left click. Is there a possibility to configure the right button? In Office I would like to get the "long press" instead, in the ScummVM Games I would like to get the "default action", wich is highlighted on touch.
I dont mind if I can configure directly in Android or if I have to use an app. I would be glad for any idea which could help.
Thank you!
I don't think you can get right click of the mouse on the phone, because if you connect the mouse your clicks (any button) simply translates into "touches". As "left" and "right" is not something about "touching" the screen. I tested this on Nexus 7 (where you just plug mouse and get black mouse cursor visible on the screen) -- no one app didn't react on "right click" or "mouse over" (no a button to highlight). You can click and drag - that is ok and no problems. You can mimic any touch action, but i didn't notice event implementation for mouse specific staff.
greenyadzer said:
I don't think you can get right click of the mouse on the phone, because if you connect the mouse your clicks (any button) simply translates into "touches". As "left" and "right" is not something about "touching" the screen. I tested this on Nexus 7 (where you just plug mouse and get black mouse cursor visible on the screen) -- no one app didn't react on "right click" or "mouse over" (no a button to highlight). You can click and drag - that is ok and no problems. You can mimic any touch action, but i didn't notice event implementation for mouse specific staff.
Click to expand...
Click to collapse
Hey,
thank You already. For my Iconia it's the same. Just plug in the USB Adapter or connect the Bluetooth device and it's running with this black arrow. But theoretically it should be possible to get different actions by different buttons. The mice are sending the signals for right and left button (Windows PC detects it). Only Android is just configured to understand them all as "left" (In previous Android Versions the right button often was configured to "back").
What I need is something, which defines my right button as long press or something else - similar to the Logitech Setpoint software for PC (There you also can set shortcuts, Keyboard Combinations or whatever for nearly every button). I am sure, I am not the first one thinking about this, so isn't there any app/driver/trick to get this working?
I guess i can't give you concrete answer or tip here.
I am only wonder if they had support for all mouse stuff in previous Androids, why they decided to remove it from 4.1
...
technically I think it is possible that right click work under some kernels the version before last of es explorer used to work with right click like in windows but now does not... I have a XOOM runnig team eos 3 stable release
Plenty of Remote Desktop software can "decode" right click so obviously right click and left click are registered differently from android but as android lacks "right-click functionality" (it) replaces both as a left click (touch) trigger. The trick would be to replace "long touch" for right click.
To those who have bought (for example) a Note 12.2 tablet for samsung, plugging in a mouse and using "Hancomm office" would turn the tablet into an ideal laptop. After all it's big enough and now that the software is pouring in I see no reason why should Google (or at least a ... hack) won't give us proper right click. Long click is tedious for any serious consideration...
In Android every app has a menu, some devices like the Galaxy S3/4 have a hardware menu button, hitting right button could emulate the hardware menu button (it does have a specific key code, it can be opened from keyboard), or it could be used as a back like on old versions of Android (makes sense, you "enter" with left and "go back" with right), or it could easily emulate a "reasonably long" click (2.1 secs) or any keypress. The only thing that does not have *ANY* sense is making it equal to the left button like on recent Android. That's already there, no value added. If only someone could make an App to configure that choice...
Samsung Roms
I was using Samsung Roms before where when the bt mouse was connected the right button was acutaly define with "Back" and the middle mouse or mouse wheel was getting me "home".
However when I swiched to CM 12.1 the feature was not there, but as you describe left and right mouse are doing the same and mouse wheel is activating the search menu.
I haven't found any settings for that.
But I would be interested in any input on that regard.
Cheers
Joe

[Q] Does adroid have a function or library to register "on hover over" with a cursor?

[Q] Does adroid have a function or library to register "on hover over" with a cursor?
some backstory, i'm attempting a rather ambitious carpc project, and the input method (i'm hoping) should be the apple magic touchpad.
its a relatively simple, sleek looking multitouch surface i can mount around the center console to control the tablet.
i'm attempting to add haptic feedback to this system, and that depends on having some method by which the android OS is "aware" when the touch cursor is over an object it can interact with, which would send a signal through some mechanisms to a haptic feedback generator (likely just a little servo that "taps" the backside of the touch pad) to indicate when you've hovering over something.
Lexus does this, or used to to this, with their weird little mouse-like thing, it made it MUCH SAFER to use the device in a car, less need to constantly stare at the screen to see where the cursor is going
so, what are my options here?
hmm, is this perhaps the wrong forum to be asking this question?
woah, leave this for 24 hours and its on page 6? this place moves way faster than i thought

[Q] Does adroid have a function or library to register "on hover over" with a cursor?

[Q] Does adroid have a function or library to register "on hover over" with a cursor?
(reposting from the general Q&A forum, which seems to have no idea)
some backstory, i'm attempting a rather ambitious carpc project, and the input method (i'm hoping) should be the apple magic touchpad.
its a relatively simple, sleek looking multitouch surface i can mount around the center console to control the tablet.
i'm attempting to add haptic feedback to this system, and that depends on having some method by which the android OS is "aware" when the touch cursor is over an object it can interact with, which would send a signal through some mechanisms to a haptic feedback generator (likely just a little servo that "taps" the backside of the touch pad) to indicate when you've hovering over something.
Lexus does this, or used to to this, with their weird little mouse-like thing, it made it MUCH SAFER to use the device in a car, less need to constantly stare at the screen to see where the cursor is going
so, what are my options here?

Air mouse mapping help

Hey guys,
I work for an IPTV provider and we decided to ship out some of those S905 boxes to be used as STB's. We have a third party writing the app to access our service, it works great with classic STB's, but the Android version only accepts touch screen input. We can cheat it by swiping with an air mouse. I am trying to remap a couple of keys on the air mouse remote controls to act as swipe gestures (which also change channels), so we can ship those boxes with updated key maps, while we wait for the developer to fix the Android app code.
Specific questions:
1) Is there a way to make a key map, app-specific? So that the system only applies the key map when the app is open and goes back to the default key map for the device for everything else?
2) Is there something like evtest for Android that will capture input and also give me key codes? (that will make re-mapping the keys a lot easier lol)
TIA for any help you can give me. If this is not the right forum for this, please point me there.

[APP] WearMouse, a Wear OS Air Mouse App

Today I’m going to bring a little bit of magic to your Wear OS watch.
As you know from the earlier post, Android Pie has introduced a new public API for using your Android device as a Bluetooth HID Device (e.g. mouse, keyboard, gamepad, etc.), so I built a simple app that demonstrates one of the possible ways you can use this API. Also, see below for a little surprise regarding compatibility...
So, you have probably already guessed from the title what the app does: it allows you to control the mouse pointer simply by waving your hand. It is compatible with any Windows, OSX, Linux (including Raspbian), Chrome OS, Android (including Android TV) device, as long as it has a Bluetooth radio; no root, no “server” software required. Just launch the app, perform Bluetooth pairing, and then you’ll be able to:
Use it as an intuitive pointer for presentations (and also click through the slides using cursor keys);
Play Fruit Ninja with your arms (e.g. by sideloading it on Android TV, or installing it on a Chromebook from the Play Store);
Control a media player from the sofa (e.g. when using a computer connected via HDMI);
Use it as a VR controller in some Cardboard games to walk around (not for Daydream though, since it has its own controller);
Impress your friends with some telekinetic powers.
Control your DeX-connected phone;
Download
Play Store
Source (Note: the source code doesn't include the Oreo hack)
How to use it
The app features three input modes: air mouse, cursor keys and keyboard input.
The air mouse mode is pretty straightforward. It has two on-screen buttons for left and right click, a top drawer to adjust motion tracking for the way you’re wearing your watch (on your left wrist, on your right wrist, or holding it in your hand like a laser pointer), and a bottom drawer for some extra functions: click and hold (a.k.a. Fruit Ninja mode) and middle click. If your watch is equipped with a rotating crown, you can use it for scrolling as well.
The cursor keys mode is simple enough: tap on the sides of the screen to trigger corresponding keys, double-tap in the center to trigger the Enter key, long-press to quit, and there are also swipe gestures for Escape, Backspace, Space and Tab keys.
Finally, the keyboard input mode allows using either an on-screen keyboard, or voice input. Note, though, that the text you’ll see entered on your connected device depends on your keyboard layout. Only US English is supported at the moment (I can add some more, but that will require you to manually switch the layout both in the app and on the device every time).
If your watch has some extra keys, you can use those to quickly switch between the input modes.
There are also some settings available. You can choose to stabilize the pointer movements (this will smooth out smaller motions like hands shaking), enable diagonal movements for the cursor keys (which is useful for those Cardboard games), or reduce the data rate (which is helpful when you use the app with some older Nougat-based Android TV box, and the mouse pointer just can’t keep up).
A word on compatibility.
Like I said, the API was made public in Android Pie, but (as a belated Christmas present) the app will work on any watch running Oreo as well. That is, when reboot your watch, and after the trippy dots animation you see a big colorful “W” and “Wear OS by Google” instead of the “Android Wear” logo, you should be fine. The API was introduced in Oreo, and it was a bit different (and also hidden) at the time, but before Pie is was only enabled on watches by default. There is a way to enable it on phones as well, but it requires root.
A few tips for troubleshooting.
If you connect and see that the mouse pointer is moving once per second in a really janky way, try turning Airplane mode on your watch on and off, and then reconnect. Looks like there is some occasional issue with power management in the Bluetooth stack…
If you want to adjust the “sensitivity”, please look for the pointer speed setting on the connected device, not in the app itself.
If you are using the app with a device that is connected to a TV, you’ll probably want to switch your TV to the “Game” picture mode. This should turn off any post-processing that may cause a lot of lag on modern TVs.
I also recommend turning off wrist gestures in your watch’s settings when you use the air mouse mode, otherwise there’s a high chance of triggering the “back” or “go home” gesture.
This looks great!
By chance is it possible to have an app that connects to the computer and when it disconnects it locks the PC!
c_86 said:
By chance is it possible to have an app that connects to the computer and when it disconnects it locks the PC!
Click to expand...
Click to collapse
Depends on what you mean.
If you want to make an app that sends Win+L (or Ctrl+Alt+L) when you press "disconnect" on your watch (or maybe connects, sends the key press, then immediately disconnects), then it should be easy enough to implement.
If you mean that the PC should lock itself when your watch disconnects (e.g. goes out of range), then obviously you'll need to have something on your computer to do that. Then again, Windows 10 has a feature called Dynamic Lock that does something similar based on your phone nearby presence.
Idea - Does it possible to implement the same functionality for Smartphone with Android 8? And after that to create Wear app for smartwatches with lower Android version, where the new API is missing - it will act as a remote for the companion app on the smartphone
bobybc said:
Idea - Does it possible to implement the same functionality for Smartphone with Android 8? And after that to create Wear app for smartwatches with lower Android version, where the new API is missing - it will act as a remote for the companion app on the smartphone
Click to expand...
Click to collapse
So, you mean, use a phone connected to a computer (or a TV, our whatever) using this API, then stream motion data from the watch using the phone as a proxy?
Technically it's possible, I wonder what the latency would be though.
Also note that a phone running Android 8 has to be rooted to do this (unlike watches), whereas Android 9 should just work.
Yea, you're right for the lag...
Then i think that it will be useful to have app with the same functionality for a smartphone
Sent from my SM-N960F using Tapatalk
bobybc said:
Yea, you're right for the lag...
Then i think that it will be useful to have app with the same functionality for a smartphone
Click to expand...
Click to collapse
It's not just lag, but power consumption as well.
This API makes use of the low-power mode of the Bluetooth radio called Sniff Sub-Rating (SSR) specifically designed for sending rapid bursts of tiny data packets, whereas watch-to-phone connection would have to be fine in a more generic way.
Making a phone app is really easy, you can pretty much use the same source code, with a few simple changes (mostly deletions). The Android Pie upgrade for your Note 9 is going to arrive pretty soon, which will allow you to experiment with it all you want.
I need the apk since I have a Moto 360 1gen so & cannot look at it on Googleplay

Categories

Resources