Imitate bluetooth Human Interface Device - java

I would like to know if there is a possibility that an app can simulate a Human Interface Device over bluetooth of an android device.
In my context this would be an app, which simulates a mouse, that should be recognized by a computer as a bluetooth mouse. Ideally this should be realizeable in java.
I know this question has been asked several times in the past but i want to know if there are new nonoutdated possibilities.

This should be possible in android pie and later by using the HID device profile, but a lot of chinese manufacturers ignored to implement the HID profile. You can check if your phone supports Bluetooth HID device profile with the app - https://play.google.com/store/apps/details?id=com.rkaneapplabs.bluetooth_hid.bluetoothproxy and let your device manufacturer know if they don't support your device because its part of android pie and should be supported.
During discovery the Android app will publish a SDP service-record where the computer can find out that the Android device support the HID-profile. The Android device will still be identified as the original Class of Device (COD). Most PC's will work great with a BT mouse app on a phone, but some devices (Game consoles) scanning for a BT-mouse will only look for devices belonging to the 'mouse' COD, and ignore other devices such as phones and tablet.

Related

Developing android apps for Zebra devices

My simple query is that how different are the zebra devices from normal android devices?
Also if we develop android apps for normal android devices will it work on zebra devices?or vice versa?
Also what are the android versions supported on Zebra devices?
we need to have simple app with GPS trailing/tracking and data entry on zebra devices?
Can any one suggest how to start with development?
Thanks,
Zebra offers two variants of android running on their devices, GMS or non-GMS (Google Mobility Services). In either case you will have access to all the standard Android APIs but on GMS devices you also have access to the full range of Google Play Services. You can develop an application that runs on both Zebra and non-Zebra devices, the only complication is the scanning SDK (EMDK) will need to be specified in your gradle file in rather than as an add-in (http://techdocs.zebra.com/emdk-for-android/6-4/guide/programming_practices/#emdkasadependencyinbuildgradle). The version(s) of Android supported on Zebra devices vary depending on the device type, most of the devices right now are running Lollipop or Marshmallow. Not all devices support GPS (since some are targeted for indoor use-cases like warehouses) so make sure your device supports that.
The best place to start development would be the Zebra docs page which gives an overview of your development options: http://techdocs.zebra.com/help/
For transparency, I work for Zebra

WP10 Detected Bluetooth device functions

As all users of Windows Phone 10 know, the Bluetooth connectivity on this system is cutted to the simplest for end-user, which ends for programmers as a horror to create anything. When connecting to a device, system automatically looks for a "functions" that device has, for ex. audio. The questions are as following:1. How to define a function like that on external Android device? The main goal is, to control all types of music playback from it (ex. Groove music playing)2. Where can i find a list of things like this, for future app functions?
And to get ahead of answers, I already tried the easier ways, which came to nothing due to UWP limits of controlling other apps playback.
Main target of project is to make a xamarin c# (or java, I can "translate" from one to another with ease) android app for a smartwatch and in c# uwp for windows phone to do most common tasks, like - as mentioned before - music playback control and notifications reciever.
Based on your description, you want to develop an Android app to send Bluetooth command to control the music player of a windows phone device, then it depends on your Bluetooth of your android device.
But control music player by Bluetooth need the profile Avrcp I have check the google Bluetooth API I did not find the profile of Avrcp, I think it is may be hard to send the Avrcp command at the android application level.
And Android is source opened, many device factories prefer to customize their own Android system, it is possible that the device uses a Bluetooth module as a serial device, then the official Bluetooth APIs are not suitable for this scenario, the develop protocol of this Bluetooth module is in need.

Reliable way to check if the device is a phone, tablet, or set-top box

I'm writing an application where I have to send statistics that has "STB/SMARTPHONE/TABLET" as one of the obligatory fields, and I can't quite find how to check that. I can't use screen size because of devices like Galaxy Note with huge screens, and some phones have higher resolution than some tablets, same with dpi (I think). Checking if screen width is larger than height is useless in my case because the app always runs in landscape. Is there anything I can do?
Basically, what the manufacturer calls it.
You will need to make a list of every device manufacturer and contact them, asking them to declare for each of their device models whether it is a phone, tablet, etc.. You can then build a database that maps something like Build.PRODUCT to the manufacturer's declaration, and use that database to make the determination whether any given device is a phone, tablet, etc.
There is nothing in Android where a manufacturer declares whether the device is a mobile phone, tablet, set-top box, in-car navigation system, in-car entertainment system, watch, television, seat-back entertainment system (for airplanes), desktop phone, etc.
You should better send Manufacturer, Device, Android version, network and other related information back to statistics server. Leave the analytics at server side(new devices database update doesn't need client update)

USB device for Android

I have a usb device that I have been using in windows OS. I am to connect that device to an Android Tablet. Can you suggest some API for developing my programs to communicate over the USB device using Android Operating system.
Thank you so much for your interest
I think you can only do this on a rooted phone, and it is a complicated and "unsafe" process.
You can check this other post in stackoverflow forums where other references are mentioned. Some people have managed to do this but with rooted phone and some tricks, and also some projects are mentioned that were considering USB connection as a future goal, even though such development might not have been yet achieved. The link is: Android apps, communicating with a device plugged in the USB port

Is there a way to communicate with USB devices on Android?

I have a really short question: Is it possible to communicate/use USB devices on Android OS? I assume it might be tablet device.
Lest say i want to connect some sort of USB card scanner to android tablet. Will it work? Do i need to write drivers by myself?
Thanks.
First, you need a USB host port on your tablet. Except for On-the-Go (which is a special design that can be either host or device), it is not possible to connect two USB devices together. The incompatibility is electrical, no amount of software changes can make it work.
Yes, some phones can work as hosts, like the DROID. Do a Google search for connecting a USB keyboard to an android phone, such as here: http://www.tombom.co.uk/blog/?p=124
Yes, it will work, and you do not need to write drivers for the Android side. However, the device must support the open accessory protocol and must be able to supply power to the Android device. A development kit is available.
However: "Accessory mode is ultimately dependent on the device's hardware and not all devices support accessory mode."

Categories