I am working with android.hardware.camera2.params.StreamConfigurationMap object in a Delphi (10.2 Tokyo) application. I need to call the getOutputSizes
function. The Java2OP tool has created the interface that looks like:
function getOutputSizes(klass: Jlang_Class): TJavaObjectArray<Jutil_Size>; cdecl; overload;
In Java the call looks like map.getOutputSizes(SurfaceTexture.class);
In Delphi, I have created an instance of the StreamConfigurationMap object from the CameraCharacteristics instance like this:
map := TJStreamConfigurationMap.Wrap((mCameraCharacteristics.get(TJCameraCharacteristics.JavaClass.SCALER_STREAM_CONFIGURATION_MAP) as ILocalObject).GetObjectID);
And in order to call the getOutputSizes function I am doing this:
availableSizes := map.getOutputSizes(TJlang_Class.JavaClass.forName(StringToJString('SurfaceTexture')));
is TJlang_Class.JavaClass.forName(StringToJString('SurfaceTexture'))
the best translation for SurfaceTexture.class
in Java?
Thank you
Sam