It’s been a while since I worked with this API, but here are two things you’ll find helpful:
Yet Another Image Sharing App (currently beta testing: https://play.google.com/apps/testing/pl.collage)github.com
My hacky solution to that problem in a side project. The link above directs you straight to the CameraFragment which handles camera preview.
material-camera - One of the most difficult APIs on Android, made easy in a small library.github.com
Lib that I’ve found recently. It claims to make all that pain with both camera APIs go away.
Hope any of that helps. Cheers