I am trying to connect USB web camera to my Android phone and capture images using the web camera. I want to do this without using any Library. As far as I see, I could not find any Android API to support USB web camera. I see a lot of applications on the PlayStore doing the job.
Related
I'm trying to make an android app that preview a stream from an external USB camera.
I can see the camera using UsbManager but for some reason, the CameraX doesn't list it in the connected camera list.
Does anyone have an idea how to fix this?
Also, I've downloaded for my android device some random app that allows streaming from a USB camera and it worked so I don't think it is a problem that the camera isn't compatible to work with an android device or something like that.
afaik CameraX doesn't support UVC cameras yet/still and Android doesn't provide a driver... for Android system UVC camera is just "some USB" device (as you noticed - handled by UsbManager) and you need to provide a driver by self...
so you can use some other libraries for getting UVC video, probably currently best is AndroidUSBCamera by jiangdongguo
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...
On the website it says that even though there is no SDK provided for android it is possible to connect it to the android device with a micro-USB adapter. Is it possible to extract images from both cameras of ZED in this case? Is so, any code samples to accomplish this task?
I have contacted the ZED Support Team and receive the following reply:
You need to connect the camera to the USB port (but note that it will
behave in USB2 mode).Then to extract the side by side image of the
ZED, you need to do some JNI in C (Java/Android does not allow native
grabbing from USB). To do so, you can find on github a libuvc wrapper
for android that reads UVC camera such as the ZED. (
https://github.com/saki4510t/UVCCamera )
Enjoy!
I'm thinking about using the Sony Camera Remote API, but before I start I'd like to know if it's possible to create a connection between an Android device and a Sony camera without wifi. I'd like to know because I'm developing an app where taking pictures is one of the functionalities and that needs to happen even when there is no wifi.
Unfortunately, the Camera Remote API only works over WiFi, so there is no other way to control the camera.
I am creating an application that connects to the phone camera from native code.
This works great on my phone.
The problem is that when i try to do the same thing with android emulator, there is
no "/dev/video" to connect to (i know the camera is connected because i am able to open it
using the camera app).
Does anyone know if there is another way i can connect to the camera from native code?
/dev/video0 is, in terms of Android, an implementation detail, and not guaranteed to be present on any device or emulator.
Emulator support for camera is very limited, see for example Android webcam enable in emulator
There is no official native camera API on Android, so there's no guaranteed to work way of doing this.
For maximum compatibility, use the Java API and send the image data to native code for processing, if necessary.