Getting Tablet.input via USB-cable connection - android

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.

Related

Android app connect with Windows app on my desktop

I am trying to develop a Windows Desktop app similar to Task Manager which can monitor my PC with Visual Studio Express. Now I want to develop one app for my Android phone with which I can connect to this Windows App from anywhere and see some of the graphs and little info (light weight) on my phone in a secure way.
What tools do I need on my desktop and Android phone to develop the app. How can I develop and connect it? If you can help me it will be great.
Thanks.
Probably the easier way for you to do this is to create a server application which both your apps connect to which will need to be on the internet or on a network where both have access to it. The desktop app would be sending its' information and the phone application would be requesting that information. As for what the server needs to be, that is agnostic, however using REST or Websockets (More ideal but a bit harder to work with) for communication would probably be ideal.
To get started I would suggest looking up a tutorial where you do API requests to a server (On either Android or Windows Store Apps). Then look at building your own server application to distribute your own API.
I hope this helps.

Develop remote desktop connect android app for windows or linux system

I want to develop remote desktop connectn app in android to connect linux or windows system. I dont have any idea from where to start proceeding. provide me some API of plan how can i do this since iam new to android. this is my project work in a course.
I don't know what your experience is with software development as a whole, but you're going to need the computer you plan to remote desktop to to be running a remote connection server such as VNC and then you'll need to create a socket connection to that server from Android and pass messages to the server for the things you want it to do. Without a library, which I don't know of any, this is going to be a huge undertaking and you might want to consider a smaller project if you have never done anything in Android before.

Connecting Kinect to 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.

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.

Streaming data from Android device to development PC

I am wondering how I can possibly stream data from an android device to my development PC. What I am actually trying to achieve is to stream some numerical data over to my PC and plot them in gnuplot in real-time.
Any ideas ?
In a development environment, I assume your phone and PC are on the same network (wifi, or even via USB/ADB which can be used to relay network packets). If that is the case, simply write a TCP/IP server (or web application) that runs on your PC, and have your Android application connect to it and provide the data.
Disclaimer: I work for Realtime.co. No, I'm not trying to sell you anything. Just trying to help.
Another thing you can try is using a cross-platform communication layer such as Realtime.co. It has an Android API as well as other APIs such as Java, PHP, .Net, iOS, JavaScript, etc.. So you can actually use it as your communication layer between your phone and any platform you need to be using on your computer (a browser, a Windows application, a Java, application, etc.).
I hope that helps!

Categories

Resources