How can I shoot wide-angle on Redmi Note 11 Pro and Similar devices?

Skip to first unread message

Ahmet Sina Birdevrim

Aug 24, 2023, 4:21:24 AM8/24/23
to Android CameraX Discussion Group

I'm looking for the lowest one by comparing the focalLengths values in the logical camera ids to get the wide-angle shot. However, on devices like the Redmi Note 11 Pro, the logical camare id returns one. How can I provide wide-angle shooting in such situations?

What's the best approach to shooting wide-angle?


Aug 24, 2023, 4:54:49 AM8/24/23
to Android CameraX Discussion Group,
You may query the intrinsic zoom ratio of all cameras by using CameraProvider.getAvailableCameraInfos, then obtain the camera selector corresponding to the wide-angle (the one that has intrinsic zoom ratio smaller than 1.0)

CameraSelector wideAngleCameraSelector = null;
List<CameraInfo> allCameraInfos = cameraProvider.getAvailableCameraInfos();
for (CameraInfo cameraInfo : allCameraInfos) {
    float ratio = cameraInfo.getIntrinsicZoomRatio();
    if (ratio < 1) {
        wideAngleCameraSelector = cameraInfo.getCameraSelector();

if (wideAngleCameraSelector != null) {
    cameraProvider.bindToLifecycle(lifecycleOwner, wideAngleCameraSelector, useCase);

Ahmet Sina Birdevrim

Sep 1, 2023, 2:52:38 AM9/1/23
to Android CameraX Discussion Group,, Ahmet Sina Birdevrim

Thanks, I tried this method, I was able to get wide angle feature on devices like Samsung s21. But on Redmi Note 11 Pro, CameraProvider.getAvailableCameraInfos() does not give wide angle information. As far as I understand, it is due to the manufacturer's failure to provide this information.

24 Ağustos 2023 Perşembe tarihinde saat 11:54:49 UTC+3 itibarıyla şunları yazdı:
Reply all
Reply to author
0 new messages