I have tried using camera2 with physical lenses to allow the users to access all lenses of the phone, it works perfectly fine on phones like Pixel and S23Ultra, it does not work on other devices which is expected. I use an application called Protake(free app on google play) to assess my work. This app obviously uses Camera2 with physical lenses. On the phone OnePlus8 it shows an extra lens that I can't find when using my implementation on with camera2 which works well on other devices as I mentioned.
I am using the same code for camera2 from the google repo except for the physical lenses ids part I get the ids form the
cameraCharacteristics.physicalCameraIds
I am not sure if I am missing something. Or is it that Protake is using a private api that is granted to them from OnePlus?
If you haven't, check what the full list of camera IDs is at the top level.
While Android is trying to push manufacturers to use the logical / physical camera IDs to model multi-sensor cameras, not all OEMs are yet onboard, and have a variety of custom solutions for their devices.
That could involve extra camera IDs where IDs > 1 map to specific image sensors; these could also be hidden from the ID listing you get (but possibly visible in the camera service debugging information available via
adb shell dumpsys media.camera). Or some devices do implement automatic switching between sensors when zooming, but do not implement physical camera APIs for direct access to specific cameras. This presumably isn't the case for OnePlus8, since other apps have found a path to access.It could also involve vendor-specific capture request settings, though that seems a bit less likely for this kind of feature.