I have a problem with a code snippet that I added to the end of the createCameraPreviewSession function of the Camera2Basic example code.
I have the following snippet that prints the camera characteristics to the console:
CameraManager manager = (CameraManager) getContext().getSystemService(Context.CAMERA_SERVICE);
CameraCharacteristics characteristics = manager.getCameraCharacteristics(mCameraId);
List<CameraCharacteristics.Key<?>> keys = characteristics.getKeys();
for (CameraCharacteristics.Key key: keys){
//Log.i(key.getName(), (String)characteristics.get(key));
//Log.i("hello", "there");
System.out.println("Key: " + key + "- " + key.getName() + "; Value: " + characteristics.get(key));
}
and for the most part it returns good values:
Key: android.sensor.info.pixelArraySize; Value: 4128x3096
But for many values the result is neither reasonable nor null, but appears to have some encoding issue:
Key: android.control.aeAvailableModes; Value: [I@829b672
I've tried testing for and omitting null values and re-casting to String. Ideally I need to print out the full set of values legibly, or test whether the value is relevant rather than getting garbage values in the list.