getCameraOutputSizes

fun <T : Any> Context.getCameraOutputSizes(klass: Class<T>, cameraId: String): List<Size>

Gets list of output sizes compatible with klass of a camera. Use it to select camera preview size.

Return

List of resolutions supported by a camera for the klass

Parameters

klass

a non-null Class object reference (for example SurfaceHolder::class.java)

cameraId

camera id