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!
Related
I am pretty new to Android, so bear with me. I've done a good deal of C#/C++ coding for Windows and some for iOS. But I've never done Android.
So I was wondering what do I need to connect an Android phone (we have Google Nexus 5X) directly to a Windows desktop via a cable and then send/receive text messages through it?
I'm assuming that I will need to code an interface app on the phone and then write a .NET module for Windows integration, for as long as the "connection" part is not proprietary.
PS. I know that there are online services that allow to send text messages for a small fee, but that's not what I'm interested in here. In my case I'm planning to integrate this capability with some additional software that we use here in the office.
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.
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.
I have a requirement where, I need to establish communication between a program running in Linux machine and android app running on phone. Both phone and PC are connected to same wireless network. I want to transfer data between app and linux process.
A simple use case can be, controlling a PC game from android device. I am looking for some standard solution for this kind of problem
Your best bet is probably to implement a Web Service on the machine you would like to control. This will make it so you don't have to invent your own protocol and deal with sockets, and it will give you a lot of control and ease compared to something like SSH.
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.