Android smartphone to computer - android

I have an android smartphone and a laptop and I want to establish a bidirectional bluetooth link between them.
What I want is for my laptop to request taking pictures from the smartphone camera. After that, the command would tell the smartphone to send to the laptop the recently taken picture for further processing.
All the instructions shall be described inside a C++ program (all done inside Visual Studio).
My final intention with the pictures is to make some pattern recognition.
The question is: How can I achieve that without interfering with the smartphone?
With other words I'm in a room with a laptop, and in the other room is the smartphone. How can take pictures from the smartphone's camera via bluetooth, process them in my laptop, all without but a single command sent from a C++ program?

Related

Photo transfer from Android device (no screen) to Android smartphone

I am working on an Android pastime project. I have a camera device that runs on Android 8.1. This camera device doesn't have a screen. I am trying to identify the best way to transfer photos from the camera device to my smartphone. So, I see a few options.
Pair the camera device with my smartphone over Bluetooth. This way, I can transfer photos over Bluetooth. In this approach, I will be building a background Android service and pushing it to the camera which can take care of transferring the photos. Ref: https://developer.android.com/guide/topics/connectivity/bluetooth/transfer-data
Have a hotspot turned on on my smartphone. Connect the camera device with the smartphone's hotspot. This way, I can upload the photos captured to Firebase or some other cloud platform and later pull the photos on the smartphone. The only problem I see is that the hotspot should be always on.
Make the camera device utilize the data connection of my smartphone. I am not sure if this is feasible.
I am evaluating these options to identify which will be a better option. I am trying to understand what kind of Android services I would have to build and push to the camera device and my smartphone. Any thoughts/insights are welcome.
Details about the camera device:
The camera device (camera module) has both Bluetooth and wifi capabilities.
The camera device is not stationary. So it can't be connected with home wifi or specific wifi. But the camera will always remain closer to my smartphone.
As the camera runs on Android, I can build services/APKs and push them to the camera. The same applies to my smartphone.
I am trying to find more details on how the photo transfer works on devices like Google glass.
Personally I would go with Wi-Fi Direct or Wifi hotspot just for faster transfer and plenty of libs and implementations for IP. Bluetooth is significantly slower and you will probably write a lot more code for handling file transfer
and when talking about IP connection - I would go with libstreaming. In there you have an RTSP server, common solution in IP cams and similar kind devices. It will stream video live, I'm not sure it is capable to do photo during this, but for sure you could add such feature. And you have ready-to-go solutions for handling camera and data transferring through Wi-Fi, based on some RFCs and official docs, not some custom not-so-reliable implementations
PS. Google Glass is a bad sample in this case, it needs Internet connection to work...
PS2. Yep, this answer is opinion-based, this kind questions are in fact forbidden on SO...

Streaming Android tablet display to notebook

I'm recording (external and internal) sensor data on my Android tablet. Now I would like to stream these recorded sensor data over internet to my notebook / PC and display a graph of the data there. I have found this nice tutorial: http://simena86.github.io/blog/2013/04/30/logging-accelerometer-from-android-to-pc/
In this tutorial the data is streamed from Android over sockets to a python application which in turn uses a Perl script for plotting (I have never used perl before).
Now I would also like to stream the tablet display as well as the front cam recording (i.e. video data) from the tablet to the notebook / PC. Is there an easy way for doing this or can the above method be altered to achieve this?
Use a VNC server on your tablet. There are several out there; I've used Alpha VNC. Then on the computer use a VNC viewer such as RealVNC to connect to it, and this will allow you to view the tablet screen on the PC.

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.

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.

Communicating with the PC via USB connection in Android

I'm fairly new to android programming and need some information for a 4th year forensics course project. Basically I am trying to create a suite of tools for live analysis of an android phone. I know how to get the information I need on the phone, but I was wondering if there was a way to communicate that information back to the PC? I want to be able to run a program from a PC, which, when the phone is docked, will allow the user to access information about the phone (ie currently running services/processes, bluetooth/wifi connections, etc). I have a bunch of methods that will run on the phone and get all the information, but I want to be able to call those methods from the PC, execute on the phone, then have the information sent back to the PC to display to the user instead of just displaying it on the phone. This is to leave as small a footprint on the phone as possible. Thanks a lot.
The ADT eclipse plugin does some of what you are asking.
http://developer.android.com/intl/es/guide/developing/tools/ddms.html
If you can track down the source for it, you should be able to figure out how to do it.

Categories

Resources