Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

CameraX does not allow the use of the telephoto lens on Honor 200 and RealMe 12 phones

86 views
Skip to first unread message

Nathan Monzani

unread,
Dec 16, 2024, 6:10:02 AM12/16/24
to Android CameraX Discussion Group
Good morning,

We are developing an application that uses the device's cameras (Honor 200's 2.5x tele, RealMe 12 3x tele) written in Kotlin. While integrating the Android CameraX API, we encountered a limitation that prevents access to the telephoto lens on the device and actually only allows us to access the 1x camera, ignoring the wide angle as well.

We then tried to use the Camera2 API to have greater control, but still nothing, for these two phones the ids returned from the API were always:
- BACK: 0
- FRONT: 1
and are identified as physical and not logical devices.

The code, which does not work on RealME 12 and Honor 200 devices, works on the Samsung S23 Ultra device.

Has anyone encountered similar problems and know how to fix them?

Scott Nien

unread,
Dec 16, 2024, 10:15:17 AM12/16/24
to Nathan Monzani, Android CameraX Discussion Group
This is likely that OEMs didn't implement the Android multi-camera capabilities and only exposed those capabilities privately in their own built-in camera app. 
Currently we aren't able to provide any solution to fix that. 


--
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/d993ffaf-3d89-46d1-9a99-1b5f73307137n%40android.com.
Message has been deleted

Zahid Nazir

unread,
5:34 AM (8 hours ago) 5:34 AM
to Android CameraX Discussion Group, scot...@google.com, Android CameraX Discussion Group, nathanm...@gmail.com

I am developing a camera app using CameraX and have a requirement to select a specific lens—such as the wide-angle or telephoto lens—similar to the functionality available in the native camera app on Pixel 8 and Pixel 9 Pro devices. Since Pixel phones are our standard, I would like to know if it is possible to programmatically switch between individual lenses, as we have already implemented this feature in our iOS app.

Additionally, I have noticed a potential issue with CameraX:
When I launch the camera with setLinearZoom(0.30f), the zoom works as expected initially. However, if I minimize the app and then maximize it again, the zoom value automatically resets to 1x or 2x. Could you please help me understand why this behavior occurs? Is this a known issue with CameraX, or is there a recommended way to maintain the zoom state when the app goes into the background?

var camera = cameraProvider.bindToLifecycle(
lifecycleOwner,
cameraSelector,
preview,
imageAnalysis,
imageCapture
)
camera.cameraControl.setLinearZoom(0.30f)


Thank you!

Reply all
Reply to author
Forward
0 new messages