Sub SetCameraFocusTarget(x As Float, y As Float)
Dim pf As JavaObject
pf.InitializeNewInstance("android.graphics.PointF", Array(x, y))
Dim cc As Object = pf.CreateEventFromUI("dji.common.util.CommonCallbacks$CompletionCallback", "callback", Null)
GetNativeCamera.RunMethod("setFocusTarget", Array(pf, cc))
Wait For (pf) Callback_Event (MethodName As String, Args() As Object)
If Args(0) = Null Then
Log("Focus set successfully.")
Else
Log("Error setting focus: " & Args(0))
End If
End Sub
Sub GetNativeCamera As JavaObject
Dim jo As JavaObject = camera
Return jo.GetFieldJO("camera")
End Sub