Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Using external cameras with CameraX

43 views
Skip to first unread message

Anton Ivanov

unread,
Mar 12, 2025, 12:55:26 PMMar 12
to Android CameraX Discussion Group
Hey,
I need to capture video/photo/analysis stream from the external camera. The one I'm trying with now is https://www.e-consystems.com/camera-modules/16mp-sony-imx298-autofocus-mipi-camera-module.asp. LENS_FACING_EXTERNAL doesn't work, I also tried CameraFilter and checked every camera it provides but no luck(it's just different internal cameras). 
What is the best way to add support for external cameras here?

Eino-Ville Talvala

unread,
Mar 12, 2025, 1:01:22 PMMar 12
to Anton Ivanov, Android CameraX Discussion Group
Hi Anton -

Unfortunately, very few mobile devices today actually implement support external cameras such as USB webcams.  You can check if the device you're using supports them by seeing if they declare the PackageManager#FEATURE_CAMERA_EXTERNAL.  If the Android device doesn't, then it's unlikely CameraX can access your external camera.

It's still possible to use a USB-based webcam (UVC protocol) on Android, but it requires using the UsbManager APIs directly and having to essentially implement your own UVC camera driver in your app. I believe there are libraries available to do that, but I'm not very familiar with them.

- Eddy

CONFIDENTIAL

This  e-mail  and  any  attachments  are  confidential  and  intended  solely  for  the  addressee  and  may  also  be privileged or exempt from disclosure under applicable law. If you are not the addressee, or have received this e-mail in error, please notify the sender immediately, delete it from your system and do not copy, disclose or otherwise act upon any part of this e-mail or its attachments. Internet communications are not guaranteed to be secure or virus-free. Revolut does not accept responsibility for any loss arising from unauthorised access to, or interference with, any Internet communications by any third party, or from the transmission of any viruses. Replies to this e-mail may be monitored by Revolut for operational or business reasons. Any  opinion  or  other  information  in  this  e-mail  or  its  attachments  that  does  not  relate  to  the  business  of Revolut is personal to the sender and is not given or endorsed by Revolut. Registered  Office: 7  Westferry  Circus,  Canary  Wharf, London,  E14  4HD,  United  Kingdom.  Main  Office: 7 Westferry  Circus,  Canary  Wharf, London,  E14  4HD, United  Kingdom. Revolut  Ltd  is  authorised  and regulated by the Financial Conduct Authority under the Electronic Money Regulations 2011, Firm Reference 900562.

--
You received this message because you are subscribed to the Google Groups "Android CameraX Discussion Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to camerax-develop...@android.com.
To view this discussion visit https://groups.google.com/a/android.com/d/msgid/camerax-developers/ffd766cf-1ca9-4a65-b589-132996153221n%40android.com.

Anton Ivanov

unread,
Mar 12, 2025, 1:54:31 PMMar 12
to Android CameraX Discussion Group, etal...@google.com, Android CameraX Discussion Group, Anton Ivanov
Thanks for you answer.
Is there any way to provide the external camera to CameraX if I properly implement UVC camera driver?

Eino-Ville Talvala

unread,
Mar 12, 2025, 2:17:39 PMMar 12
to Anton Ivanov, Android CameraX Discussion Group
It's not something that CameraX supports today. 
Reply all
Reply to author
Forward
0 new messages