When Android 9(API 28) was released, I was very happy to discover that the physical cameras of the phones with multiple cameras would be exposed, I had been very frustrated to not be able to access them. Today I stumbled upon the android Q documentation which says:
Starting from API level 29, some or all physical cameras may not be independently exposed to the application, in which case the physical camera IDs will not be available in CameraManager.getCameraIdList(). But the application can still query the physical cameras' characteristics by calling CameraManager.getCameraCharacteristics(String).
This statement confuses me, does it mean that Android is backtracking? what's the purpose of the change?
I'm interested in managing cameras at a very fine level, will this change prevent me from doing what I'm able to do today with Android 9?
It says that the IDs may not be listed any more but that the characteristics can still be queried, how are we supposed to get the characteristics of cameras without having their IDs? I guess we are supposed to get the physical cameras' IDs via getPhysicalCameraIds()
on logical cameras, but does it means that if we wanted to use a "hidden" camera, we'd have to test a bunch of random ID strings?
And will we still be able to create capture sessions with SessionConfiguration on physical cameras that are not exposed?
Can someone shed some light on this?
camChars.availablePhysicalCameraRequestKeys
andsetPhysicalCameraKey
– Fenestra