0

Does anyone know how to convert a JObject that was returned from android.hardware.camera2.CameraCharacteristics.get() to an Integer and also how to convert an Integer back to a JObject in Delphi.

Thank you
Sam

Sam
  • 2,473
  • 3
  • 18
  • 29

1 Answers1

1

When requesting a Key whose type is a Java Integer, type-cast the returned JObject interface to JInteger, and then you can call its intValue() method.

To assign a Delphi integer to a JObject, use the TJInteger.JavaClass.init() or TJInteger.JavaClass.valueOf() method, both of which take a Delphi Integer as input and return a JInteger interface, which you can then type-cast to JObject.

Remy Lebeau
  • 555,201
  • 31
  • 458
  • 770