I have an "MINIX NEO X7 mini" Android device. There is installed application eHomeMediaCenter. It is a DLNA server. Then I launch RKRemoteControl application on my Android smartphone, select eHomeMediaCenter and see mouse cursor on my Minix. And then I can move and click. But what protocol is used for that? And why in eHomeMediaCenter? Please, give me some info about that.
Mouse and keyboard functions in the Minix Neo -- and probably Android devices in general -- builds on the desktop Linux keyboard and mouse support, specifically on /dev/hidraw -- the Human Input Drivers. See enter link description here for more info. A variety of external mice, keyboards or 'air mouse/keyboards' can be connected to the Minix Neo x5/x7 by USB, Bluetooth or other wired or wireless connection and feed mouse events of keyboard events to the normal Linux HID processing that Java -- and the Android apps consume.
I use this air mouse/keyboard with the Neo x5. (Air mouse means that the device is not placed on a desk, but accelerometers in the device allow you to wave the thing around to produce mouse movement.) What ever (perhaps proprietary) protocol is used between the device and the device driver is converted (in the device driver) to a data stream that emulates the signals that a conventional, old style, wired mouse or keyboard produced. Some devices use a generic HID device driver that is used for a serial (ie old RS-232, TTY, phone modem) device.
go through below link
http://support.aboway.com.tw/products/android/A18/TV%20stick%20mobile%20remote/RKRemoteControlGeneralCastV2.0.3/doc/index.html?com/rockchip/remotecontrol/common/DeviceCache.DeviceChangeListener.html
u will get code to implement
Related
I’m trying to set up an Android Open Accessory environment with no success. I’m using the PIC32MX250F128D controller on my board, I’ve implemented a Firmware that works in USB Host mode and handles all the Android Open Accessory Protocol. I have also an Android App to detect any external hardware plugged in the USB conector. The problem is that I’m not getting any USB “physical answer” from the tablet. From the USB 2.0 Standard (and from this document as well https://source.android.com/accessories/aoa.html ) The Accessory (the external hardware), acting as a USB Host, should wait for a 100miliseconds signal from the USB Device (Android Device, tablet, smartphones, etc..). That’s the very first step on the USB Phy Standard. What might be happening is that the USB on the Tablet side is acting as a Host and also waiting for this signal from an external Hardware. Is there any android configuration that enables USB open accessory, or something like that? Also, How can I know in which mode the USB in android is operating, or what is the "normal" mode USBHost or USBDevice?
Finally I've got it solved :). I wasn't able to detect any hardware signal, the hardware signal is either D+ or D- pin set to high and the other to low. If D+ is set to high the USB Device operates in full-speed mode, otherwise in low speed mode. I've found out that Android works in host or device mode looking at the cable plugged in. My cable was telling android to operate as host, so I didn't receive any Device Attach signal from Android.
I want my android tablet to have multiple displays, specifically with a wireless projector. I have a Diamond Video Stream adapter that runs perfectly when i run multiple displays on my laptop with the LCD projector wirelessly. I just installed the DisplayLink USB Graphics driver then it works.
Now, what i want is to do the same thing with my android tablet; To just connect the Diamond Video Stream's USB device to the android tablet (via mini usb to usb cable) and display what ever is happening on the android tablet to the LCD projector wirelessly.
Can anyone lend me a hand on this one?
Thanks.
Quite probably your tablet's USB just support USB OTG, meaning you can connect usb drives or input devices to it, but I doubt you can hook an USB display adapter.
Depending on your intended use, you can attach your projector to a DLNA media renderer and send video or audio streams via a DLNA media streamer app like twonky:
Twonky Beam
Should your phone support USB OTG, then DisplayLink technology will work.
In the product you mentioned though, you also have a wireless part.
The Samsung wireless USB chip driver is unlikely to be in the phone and, because it's not DisplayLink technology, it is not included in DisplayLink application in the store.
I have a measurement device which sends data as keyboard wedge when connected to a PC. I would like to be able to use it to input data into an Android phone or tablet through the USB port.
Anyone have an an idea if Android device USB port can be used in that way?
Only some Android devices support USB host mode, but those that do would typically recognize a keyboard as a keyboard and use it as such. An adapter cable is typically required.
One problem this might present is that if your app goes to the background, you would probably lose the keyboard input as it would instead go to whatever is in the foreground. The Android security model, if still intact, would prevent snooping on keyboard input when not in the foreground.
(They often support mice too - kind of funny to see a mouse cursor appear on your phone)
Depending on your particular model of Android device, you may be able to use this adapter, or one like it, to connect a keyboard via Android's support for USB On-The-Go
I like USB debugging on Android as it is faster than Emulator. I know I can use my keyboard in emulator but while debugging I want to use my computer keyboard (plugged to computer) instead of devices keyboard for making my input more faster. Is that possible?
Share KM is a free app that lets you use your PC's keyboard and mouse to control your Android. Connection can be made over USB, WiFi, or Bluetooth.
It works a lot like adding an additional monitor to your computer – move your mouse to the edge of your screen and the cursor moves to the Android.
I found a possibility via "adb tools". Connect your phone to the computer via usb cable and start adb at the computer terminal (e.g. Ubuntu)
adb shell input keyboard text Hello
or
adb shell input [<source>] <command> [<arg>...]
This will give you the possibility to send text/keystrokes via computer/laptop keyboard to your smartphone.
Note: your input will be sent through two shells (computer and android device), so you'd have to "double escape" even spaces. To avoid that, you may e.g. type
adb shell
input keyboard 'any text you like, including shell-sensitive characters'
the second line is input on your android device in adb shell
Tested on Ubuntu 14.04 LTS and Samsung Galaxy S3 with CyanogenMod.
Confirmed on Ubuntu 18.04 LTS and Moto G2 with Lineage OS
It sounds like you want to use your PC's keyboard via some software on the PC rather than use a separate USB keyboard connected to the Android device.
This actually is possible, but the details are device specific. You would need to send key events via adb, but you'd need to determine the implementation-specific translation of characters to event codes, and even the event channel number. There are likely open source projects out there for doing this, and you'd be better off starting with one of those than trying to develop it from scratch.
As for using a separate USB keyboard, as mentioned in comments this is a possibility on some more recent devices (typically you need an adapter cable with the ID pin grounded) but introduces the issue of not being able to use USB for ADB as well as a keyboard at the same time. One possible workaround would be to put ADB into TCP/wireless mode, unplug the computer and plug in the keyboard. A simpler approach could be to use a bluetooth keyboard.
Note that either the USB or bluetooth keyboard, and likely also the key event method, will cause the on-screen keyboard to pop up. People trying to use devices with external keyboards find this annoying and tend to install zero-height on screen keyboards; however, if you are testing what an actual user will do, then having the keyboard pop up will give a more realistic impression of the end-user experience (though of course the amount of screen real estate left after the keyboard varies from device to device).
Plug your keyboard directly into Android USB OTG port and it will work. Most of recent Android devices do support USB host mode apart very few models that have this feature intentionally removed (Google). There is also a good our guestion about this.
With my Google Galaxy Nexus and Lenovo tablet, even mouse works (mouse pointer appears). You probably can use USB switch that allows to share the keyboard between two computers. Mind also that you need USB OTG and not USB device converter (there are some USB converters that fit into micro USB OTG port nicely but are for USB devices only).
Of course, ADB cannot use the USB port if it is already taken by the keyboard. Hence you need to use wireless for ADB.
This proposal does not match fully your initial idea but seems matching the goal you are aiming to achieve (debug Android app directly on device using your keyboard).
I am doing research delving into the Android ADK. So far, my program gets the list of attached devices from the USBManager class and displays basic information about them. The USB Host mode works well and recognizes multiple connected devices even when they are two or three USB hubs away. However, the list never contains USB mice or USB keyboards, even though these devices are recognized by the system and used for input (typing into a text area, etc.). It seems that the system grabs these and doesn't present them to the ADK framework.
Is this functionality intentional? Is there any way to get access to these HID devices? As far as I know, the only to ways to get access to USB devices in Android host mode are the USB Manager and intent filters. Another poster came to the conclusion that neither allows access to HID devices.
Thanks in advance for any information or comments about this topic; I'd really like to get access to mice/keyboards so I can practice USB communication with simple devices.
What version are you testing on? 2.3.4 or 3.1?
Did you try using com.android.future.usb or android.hardware.usb?
If you can already use the HID device for input, it' working as a input device(keyboard or mouse) and you don't need to access it as a USB device.
You can simply catch the input from the device via listeners such as OnKeyListener.
If you want to check the input devices, see Can't see mouse and keyboard device with usbManager android.