How can I get access to external USB camera from a

2020-04-21 08:53发布

问题:

Is there any way to gain access to USB camera from my applications and manipulate(stop, pause, etc.) with recording using Android Camera API? If no, are there any third party APIs?

回答1:

There's no general access to USB webcams through the Android camera API, and I'm not aware of any manufacturers who would have added such support to their particular devices (although I could simply not know about it).

So you'll have to see if 3rd-party libraries exist; for full reliability, they'd have to use userspace USB, and not rely on a kernel that happens to be configured to allow V4L2 access to user-space apps. Android-webcam, for example, relies on that, which is not going to be very robust as such access is a bit of a security risk, and will likely not be very common.