简体   繁体   中英

Android Emulator - /dev/video missing

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM