Connecting Kinect to Android - android

So I'm trying to hook up a Kinect to an Android tablet using any means necessary. I would preferably like to avoid a windows machine or arduino board in the middle.
The method I've already tried is to have a C# program (the kinect sdk uses C#) communicate with the android device. I tried to figure out how to send a message through usb, and decided to do port forwarding. This worked, but was slower than I would like it to be.
I guess the question is can I connect it to Android as a usb device or accessory and communicate via JNI?

In theory you should be able to use the OpenNI for ARM. I've seen Hirotaka's demo of OpenNI running on Linaro Android but using an Asus Xtion Pro sensor and a Panda board.
Hirotaka also posted notes on his setup.
Doing a quick youtube search reveals examples with Kinect and Android tablets.
Side note: I don't I understand why you're trying to use C#: you'll be writing Android applications in Java and OpenNI has a Java wrapper.

Related

Bluetooth Low Energy application in Visual Studio C++ for image sharing. Which tools should I use?

I'm trying to develop a C++ application on Windows 10 (using Visual Studio 2017) capable of looking for nearby mobile devices and sending data (images) via Bluetooth. I'm new to Bluetooth applications, but from what I understand, the best solution is to use BLE and make the computer a GATT server.
For this purpose, I'm quite confused about which tool I should use in order to start creating my application, since most of the libraries I have found online are outdated or poorly documented (libblepp, gattlibpp, bluetoe).
I've also found this Windows API but I don't understand if this is what I should use and I don't know how to include it in my project neither.
Has anybody had some experience with this and could provide me some hints concerning the right tool to use, in order to get started with my project?
On the other side, I would like to develop a mobile app using Flutter capable of receiving the image and reading the data sent by the computer. flutter_blue looks like the best option to go with.
Edit: The idea for the application is the following: the computer runs an application that generates various frames. In the meanwhile, it constantly scans for nearby devices and, whenever a user makes a request, it sends the current output image to the device that makes the request.
The Windows API is what you should use if you write a C++ application for Windows. That will be the best supported option. If you happen to find some library that also does BLE it will probably just be a wrapper around the Windows API.
Unfortunately these APIs use the WinRT architecture which is not the easiest to set up but should work fine once you've managed to set up the environment.

The value send by a USB barcode scanner [duplicate]

I have one custom made device for measuring current. This device can be connected to PC and communication is done over USB. It is based on FTDI chip. I have application written in Java and that application is using rxtxSerial.dll library and gnu.io.rxtx_2.1.7.4.jar. Now I want to port this application on my android device and I'm litte bit confused what to do that? All I have is android tablet (os version 4.1.1), OTG cable and this measuring device.
Should my device be rooted? Is there any kind of library that I can simply add to my Java Android application and read data over USB? Where to start?
I have tried to port existing application for PC using same library, but rxtxSerial.dll is missing and I can't transfer it to my android device.
I can really recommend the USB-Serial-For-Android library, it supports multiple popular usb-to-serial chips (also FTDI) and there is no rooting required. Check out the GitHub project here.
There is a project dedicated to serial communication on Android. android-serialport-api. I think, it is a good resource to start with.
FTDI also provides Android related resources.
I think there's currently only one properly maintained library for serial USB communication and it's felHR85/UsbSerial. It supports several USB chips including FTDI (see Devices Supported).
Unfortunately mik3y/usb-serial-for-android seems to be dead.
And no, you don't need to root your device for connecting to and communicating with a USB device.
EDIT: We have a maintained fork of mik3y's library. See kai-morich/usb-serial-for-android
EDIT2: It seems that all of these libraries are maintained again, mik3y joined forces with kai-morich and they are working together.

Getting Tablet.input via USB-cable connection

I am trying to develop a remote-kind App in Unity for a Android tablet. I have a finished Desktop application which I want to control.
Right know I have a normal network client/Server connection between the two apps, but I dont want to rely on a available Wificonnection.
Now I want to replace this connection, with a direct Cableconnection. If the tablet is connected via USB with the Desktoppc, the PC should know if the remoteapp is running and should get commands from the tabletappication.
Is there any way, to access those data coming from the USB-cable in Unity?
Thanks for helping
This is possible and at the-same time complicated. You need a way to communicate with the Android and the driver on the computer and this is usually done with C++ on the Desktop Side.
Android:
You need UsbManager and UsbAccessory on the Android side to commucate with the Desktop.
On the desktop, you need WinUSB to be able to communcate with the Android device.
The correct way to do this is to build a simple C++ WinUSB app on the Desktop side then build another simple Java/Android App with UsbManager and UsbAccessory, then make them communcate with each other,
Once it starts working, then you can convert the Java code into jar/aar plugin and then convert the Windows C++ app into functions and into plugin/dll.
iOS:
If you decide later on to port this to iOS, you can use libimobiledevice with C++ on the desktop and External Accessory framework on the iOS side. You may need to join the Apple MFi program to be allowed to use the USB port on the iOS devices.

Communicating with an xbee module using Android 3+ phone

I want to connect my Xbee module to my android phone and communicate with it by sending AT commands.
I do know of the USB host facility provided by Android phones, but I do not know how to send data to it.
I have the java-Xbee API and I am able to talk to the Xbee using my computer but since my project involves using the Android OS, any help on this topic will be appreciated.
According to this Google Code Page, the java-Xbee API requires Java >= 5 and RXTX. Considering those two requirements:-
RXTX on android is not an out of the box lib and may require some hacking which may or may not work.
I'm not a Java VM expert, but i know desktop OS JVMs work differently from Dalvik.How well would Dalvik run code developed for JVM? Here is a nice StackOverflow topic discussing the two.
Faced with the above challanges, are you brave enough to boldly go where no man has gone before?
Could you also consider the following well documented and supported approaches:-
Ytai Ben-Tsvi & Sparkfun's IOIO-OTG
Saves you the headache writing android 3.1+ USB host code and thus allows you to use cheaper phones that run droids 1.5 to 2.3 (without hacking the latter).
Digi's WiFi to Xbee
Allows you to link your android phone (or any other programmable wifi enabled computer) to your device over the internet.

Connecting android app with application on a pc

I am currently trying to write an android App that is connected to a application running on a pc (even though windows is preferred linux would be ok, too) via either USB or Bluetooth. Right now I'm not really sure how far this is possible. As far as I understand the USB Android API, I can not really use USB to talk to another application. Only raw file exchange seems to be possible. The Bluetooth idea seems a lot more feasible as I see it. I'd write a bluetooth server for the PC and connect to it via a Bluetooth client written via Android API. Point is, is that possible with windows? Has anyone seen any examples for what I am looking for? All I can find for USB is teethering which is not what I want.
There are android applications which allow you to use your mobile's touchscreen act like a touch pad which can be used to control your pc or laptop via bluetooth or wifi connection just like you are using your laptop's touch pad. PremoteDroid, RemoteDroid, Gmote etc.. to name a few (or only these are available i guess!).
But to do so you also need to develop a server application which will run on the device you wish to control and help u make connection between your mobile and the device. I have used PremoteDroid and RemoteDroid and they both work well on my laptop which runs windows 7. You can even add keyboard functionality.
PremoteDroid is openly available here: http://code.google.com/p/premotedroid/
I have a Bluetooth server application on my Mac that I use to test an Android app I'm writing. The app will eventually be used to communicate with a device with a microcontroller and bluetooth modem, but I needed a way to test the app in the absence of that device. The server app is written in Java, so I think it should work on a PC (and almost certainly in Linux).
I'm happy to share the code with you--I found it somewhere on the Internet (though I can't seem to figure out where now) and modified it as I needed to. It uses the BlueCove library, and is only about 60 lines, including several imports (and the code I commented out but didn't bother deleting :). I also have a Bluetooth client program on my Mac, since my app also has server functionality.
I have never tried to do anything like this using USB.

Categories

Resources