I'm trying to rotate the camera to portrait mode and it's not working. The Mavic Pro has this capability.
It does nothing and crashes the program.
B4X:
Sub SetOrientation
Dim cc As Object
cc= CameraInstance.CreateEventFromUI("dji.common.util.CommonCallbacks$CompletionCallback", "callback", Null)
Labelssc.Text=" camerainstance is " & CameraInstance
Sleep(5000)
CameraInstance.RunMethod("SetOrientation",Array("PORTRAIT" , cc)) ' crashing program
Wait For (CameraInstance) Callback_Event (MethodName As String, Args() As Object)
If Args(0) = Null Then
Labelssc.Text="Rotated Gimbal"
Else
Labelssc.Text="Failed to rotate gimbal: " & Args(0)
End If
Sleep(5000)
End Sub
It does nothing and crashes the program.