Q:

Android Camera2 Parameters Flatten

Is there anything similar to Camera Parameters flatten but for the camera2 API? I saw a WritetoParcel on CaptureRequest but cannot get it to work.

A:

I am not familiar with the former API's flatten method, but I have been working with the camera2 API and needed a similar thing. Specifically, I wanted human-readable versions of the parameters contained in various forms of CameraMetadata. I ended up hard-coding something myself, which may help you. 
Here is my CameraReport utility class.
If contains a function to turn, e.g., CaptureRequest key values into their labels, and a function that does this to turn an entire CaptureRequest object into a JSON file. 
You could easily repurpose the relevant code from writeCaptureRquestToFile() to output to another string instead of a file, which I think might be what you are looking for.

