Android Programming Press on the image to return to the main documentation page.

DJI

List of types:

DJIAircraft
DJIAttitude
DJICamera
DJIFlightController
DJIFlightControllerCurrentState
DJIIMUState
DJILocation2D
DJILocation3D
DJISDKManager
DJIUserManager
DJIWaypoint
DJIWaypointMissionBuilder
DJIWaypointMissionOperator

DJIAircraft


Events:

ProductConnectivityChanged (Connected As Boolean)
BatteryState (Battery As Object, RemainingPercentage As Int)
Result (Success As Boolean, ErrorMessage As String)
ResultWithValue (Success As Boolean, ErrorMessage As String, Value As Object)

Members:


  BatteryReady As Boolean [read only]

  CameraReady As Boolean [read only]

  Connected As Boolean [read only]

  GetName As Object

  Initialize (EventName As String, AircraftData As Object)

  IsInitialized As Boolean

  Model As String [read only]

  RegisterBatteryStateEvent

  Tag As Object

Members description:

BatteryReady As Boolean [read only]
Returns true if the battery is ready.
CameraReady As Boolean [read only]
Returns true if the camera is ready.
Connected As Boolean [read only]
GetName As Object
Gets the aircraft name. The ResultWithValue event will be raised.
Returns an object that can be used as the sender filter parameter.
Example:
Wait for (aircraft.GetName) Aircraft_ResultWithValue (Success As Boolean, ErrorMessage As String, Value As Object)
If Success Then
  aircraftName = Value
End If
Initialize (EventName As String, AircraftData As Object)
Initializes the object.
EventName - Sets the subs that will handle the events.
AircraftData - The parameter passed to DJISDKManager ProductChanged event.
IsInitialized As Boolean
Model As String [read only]
Returns the model.
RegisterBatteryStateEvent
Registers the battery state listener.
Tag As Object

DJIAttitude


Events:

None

Members:


  IsInitialized As Boolean

  Pitch As Double [read only]

  Roll As Double [read only]

  Yaw As Double [read only]

Members description:

IsInitialized As Boolean
Pitch As Double [read only]
Roll As Double [read only]
Yaw As Double [read only]

DJICamera


Events:

FrameReceived (Data() As Byte)

Members:


  CreateVideoView As ConcreteViewWrapper

  Initialize (EventName As String, Aircraft As DJIAircraft)

  IsInitialized As Boolean

Members description:

CreateVideoView As ConcreteViewWrapper
Creates the view that will show the camera feed.
Initialize (EventName As String, Aircraft As DJIAircraft)
IsInitialized As Boolean

DJIFlightController


Events:

IMUStateChanged (State As DJIIMUState)
Result (Success As Boolean, ErrorMessage As String)
ResultWithValue (Success As Boolean, ErrorMessage As String, Value As Object)

Members:


  AutoLanding As Object

  Connected As Boolean [read only]

  CurrentState As DJIFlightControllerCurrentState [read only]

  GetLEDsEnabled As Object

  GoHomeCancel As Object

  GoHomeStart As Object

  Heading As Double [read only]

  Initialize (EventName As String, Aircraft As DJIAircraft)

  IsInitialized As Boolean

  SetGoHomeHeightInMeters (Height As Int) As Object

  SetHomeLocationUsingAircraftCurrentLocation As Object

  SetLEDsEnabled (Enabled As Boolean) As Object

  SimulatorStarted As Boolean [read only]

  Tag As Object

  TakeOff As Object

Members description:

AutoLanding As Object
Starts an auto-landing action. The Result event will be raised.
Returns an object that can be used as the sender filter parameter.
Connected As Boolean [read only]
CurrentState As DJIFlightControllerCurrentState [read only]
Returns the current state.
GetLEDsEnabled As Object
Gets the LEDs status. The ResultWithValue event will be raised.
Returns an object that can be used as the sender filter parameter.
Example:
Wait For(controller.GetLEDsEnabled) Controller_ResultWithValue (Success As Boolean, ErrorMessage As String, Value As Object)
If Success Then
  Log($"LED status: " ${Value}"$)
End If
GoHomeCancel As Object
Cancels a go home action.
The Result event will be raised.
GoHomeStart As Object
Starts a go home action.
The Result event will be raised.
Heading As Double [read only]
Returns the aircraft heading.
Initialize (EventName As String, Aircraft As DJIAircraft)
Initializes the flight controller.
IsInitialized As Boolean
SetGoHomeHeightInMeters (Height As Int) As Object
Sets the go home flight height. Should be between 20 to 500.
The Result event will be raised.
SetHomeLocationUsingAircraftCurrentLocation As Object
Sets the home location based on the current aircraft location.
The Result event will be raised.
Example:
Dim sf As Object = controller.SetHomeLocationUsingAircraftCurrentLocation
Wait For (sf) Controller_Result (Success As Boolean, ErrorMessage As String)
If Success Then
  Log("Home location set.")
Else
  Log("Error: " & ErrorMessage)
End If
SetLEDsEnabled (Enabled As Boolean) As Object
Sets the LEDS status. The Result event will be raised.
Returns an object that can be used as the sender filter parameter.
Example:
Wait For (controller.SetLEDsEnabled(True)) Controller_Result (Success As Boolean, ErrorMessage As String)
Log($"LED state changed. Success = ${Success}"$)
SimulatorStarted As Boolean [read only]
Returns true if the simulator has started.
Tag As Object
TakeOff As Object
Starts a takeoff action. The engine will start automatically.
The Result event will be raised.
Returns an object that can be used as the sender filter parameter.

DJIFlightControllerCurrentState


Events:

None

Members:


  AircraftLocation As DJILocation3D [read only]

  AreMotorsOn As Boolean [read only]

  Attitude As DJIAttitude [read only]

  FlightMode As String [read only]

  Flying As Boolean [read only]

  GoHomeHeight As Float [read only]

  GoingHome As Boolean [read only]

  GPSStatus As Int [read only]

  HomeLocation As DJILocation2D [read only]

  HomeLocationSet As Boolean [read only]

  IMUPreheating As Boolean [read only]

  IsInitialized As Boolean

  SatelliteCount As Double [read only]

  VelocityX As Double [read only]

  VelocityY As Double [read only]

  VelocityZ As Double [read only]

Members description:

AircraftLocation As DJILocation3D [read only]
Returns the aircraft location.
AreMotorsOn As Boolean [read only]
Returns true if the motors are on.
Attitude As DJIAttitude [read only]
Returns the aircraft attitude (pitch, roll and yaw).
FlightMode As String [read only]
Returns the current flight mode.
Possible values: Manual, Atti, AttiCourseLock, AttiHover, Hover, GPSBlake, GPSAtti, GPSCourseLock, GPSHomeLock, GPSHotPoint,
AssistedTakeOff, AutoTakeOff, AutoLanding, AttiLanding, GPSWaypoint, GoHome, ClickGo, Joystick, AttiLimited,
GPSAttiLimited, GPSFollowMe, Tracking, Pointing, PANO, Farming, FPV, GPSSport, GPSNovice,
ConfirmLanding, TerrainTracking, NaviAdvGoHome, NaviAdvLanding, TripodGPS, TrackHeadLock, MotorsJustStarted, GPSGentle, Unknown
Flying As Boolean [read only]
Returns True if the aircraft is flying.
GoHomeHeight As Float [read only]
Returns the go home height in meters.
GoingHome As Boolean [read only]
Returns True if the aircraft is going home.
GPSStatus As Int [read only]
Returns 255 if there is no signal. Otherwise returns a value between 0 (weak signal) to 5 (strong signal).
HomeLocation As DJILocation2D [read only]
Returns the home location.
HomeLocationSet As Boolean [read only]
Returns true if the home location was set.
IMUPreheating As Boolean [read only]
Returns True if the IMU is preheating.
IsInitialized As Boolean
SatelliteCount As Double [read only]
Returns the number of GPS satellites found.
VelocityX As Double [read only]
Returns the x-axis velocity measured in meters per second.
VelocityY As Double [read only]
Returns the y-axis velocity measured in meters per second.
VelocityZ As Double [read only]
Returns the z-axis velocity measured in meters per second.

DJIIMUState


Events:

None

Members:


  AccelerometerStatus As String [read only]

  CalibrationStatus As String [read only]

  GyroscopeState As String [read only]

  IsInitialized As Boolean

Members description:

AccelerometerStatus As String [read only]
Returns one of the following values:
UNKNOWN, DISCONNECTED, CALIBRATING, CALIBRATION_FAILED, DATA_EXCEPTION, WARMING_UP, IN_MOTION, NORMAL_BIAS, MEDIUM_BIAS, LARGE_BIAS.
CalibrationStatus As String [read only]
Returns one of the following values:
NONE, CALIBRATING, SUCCESSFUL, FAILED, UNKNOWN.
GyroscopeState As String [read only]
Returns one of the following values:
UNKNOWN, DISCONNECTED, CALIBRATING, CALIBRATION_FAILED, DATA_EXCEPTION, WARMING_UP, IN_MOTION, NORMAL_BIAS, MEDIUM_BIAS, LARGE_BIAS.
IsInitialized As Boolean

DJILocation2D


Events:

None

Members:


  IsInitialized As Boolean

  Latitude As Double [read only]

  Longitude As Double [read only]

Members description:

IsInitialized As Boolean
Latitude As Double [read only]
Longitude As Double [read only]

DJILocation3D


Events:

None

Members:


  Altitude As Float [read only]

  IsInitialized As Boolean

  Latitude As Double [read only]

  Longitude As Double [read only]

Members description:

Altitude As Float [read only]
Returns the altitude measured by barometer in meters (relative to the take off location).
IsInitialized As Boolean
Latitude As Double [read only]
Longitude As Double [read only]

DJISDKManager


Events:

RegisteredResult (Success As Boolean, ErrorMessage As String)
ActivationStateChanged (State As String)
ProductChanged (AircraftData As Object)
ProductConnectivityChanged (Connected As Boolean)
ComponentConnectivityChanged (Connected As Boolean)
ProductName (Success As Boolean, Name As String)

Members:


  ActivationState As String [read only]

  AircraftBindingState As String [read only]

  Initialize (EventName As String)

  IsInitialized As Boolean

  Registered As Boolean [read only]

  StartConnectionToProduct

Members description:

ActivationState As String [read only]
Returns the activation state.
One of the following values: NOT_SUPPORTED, LOGIN_REQUIRED, ACTIVATED, UNKNOWN
Returns an empty string if the SDK was not registered.
AircraftBindingState As String [read only]
Returns the aircraft binding state.
One of the following values: NOT_SUPPORTED, INITIAL, BOUND, NOT_REQUIRED, UNBOUND , UNBOUND_BUT_CANNOT_SYNC, UNKNOWN
Returns an empty string if the SDK was not registered.
Initialize (EventName As String)
Initializes the DJI SDK. The RegisteredResult event will be raised.
Note that an internet connection is required on the first run.
IsInitialized As Boolean
Registered As Boolean [read only]
StartConnectionToProduct
Tries to connect to the product. The ProductChanged event will be raised.

DJIUserManager


Events:

Result (Success As Boolean, ErrorMessage As String)
ResultWithValue (Success As Boolean, ErrorMessage As String, Value As Object)

Members:


  Connected As Boolean [read only]

  Initialize (EventName As String)

  IsInitialized As Boolean

  Login As Object

  Logout As Object

  State As String [read only]

  Tag As Object

Members description:

Connected As Boolean [read only]
Initialize (EventName As String)
IsInitialized As Boolean
Login As Object
Logout As Object
State As String [read only]
Tag As Object

DJIWaypoint


Events:

None

Members:


  AddAction (Action As dji.common.mission.waypoint.WaypointActionType, Parameter As Int)

  Initialize (Latitude As Double, Longitude As Double, Altitude As Float)

  IsInitialized As Boolean

Members description:

AddAction (Action As dji.common.mission.waypoint.WaypointActionType, Parameter As Int)
Adds an action that will be executed when the aircraft reaches the point.
Action - One of the following values:
STAY - Stays at the current point. Parameter = Period in milliseconds.
START_TAKE_PHOTO - Starts to shoot a photo. Parameter is ignored.
START_RECORD - Starts recordsing. Parameter is ignored.
STOP_RECORD - Stops recording. Parameter is ignored.
ROTATE_AIRCRAFT - Rotates the aircraft's yaw. Parameter should be between -180 to 180.
GIMBAL_PITCH - Rotates the gimbal's pitch. Parameter should be between -90 to 0.
Initialize (Latitude As Double, Longitude As Double, Altitude As Float)
Initializes the waypoint with the given coordinate and altitude (in meters).
IsInitialized As Boolean

DJIWaypointMissionBuilder

Mission builder. Note that the AutoFlightSpeed and MaxFlightSpeed must be set.

Events:

None

Members:


  AddWaypoint (Waypoint As DJIWaypoint)

  AutoFlightSpeed As Float

  Initialize

  IsInitialized As Boolean

  MaxFlightSpeed As Float

  SetFinishAction (Action As dji.common.mission.waypoint.WaypointMissionFinishedAction)

Members description:

AddWaypoint (Waypoint As DJIWaypoint)
Adds a waypoint.
AutoFlightSpeed As Float
Gets or sets the auto flight speed (m/s). This is the default flight speed.
Valid values are between -15 to 15.
Initialize
IsInitialized As Boolean
MaxFlightSpeed As Float
Gets or sets the maximum flight speed (m/s). Maximum speed is achieved by pushing the throttle joystick.
SetFinishAction (Action As dji.common.mission.waypoint.WaypointMissionFinishedAction)
Action that will be executed when the mission finishes.
NO_ACTION - No further action will be taken on completion of mission.
GO_HOME - The aircraft will go home and land.
AUTO_LAND - The aircraft will land at the last waypoint.
GO_FIRST_WAYPOINT - The aircraft will go to the first waypoint.
CONTINUE_UNTIL_END - Mission will not end until StopMission is called.

DJIWaypointMissionOperator


Events:

MissionProgress (ExecutionEvent As Object, TargetWaypointIndex As Int)
MissionStart
MissionFinish (Error As String)
Result (Success As Boolean, ErrorMessage As String)
ResultWithValue (Success As Boolean, ErrorMessage As String, Value As Object)

Members:


  Connected As Boolean [read only]

  Initialize (EventName As String)

  IsInitialized As Boolean

  LoadMission (MissionBuilder As DJIWaypointMissionBuilder)

  MissionState As String [read only]

  PauseMission As Object

  ResumeMission As Object

  StartMission As Object

  StopMission As Object

  Tag As Object

  UploadMission As Object

Members description:

Connected As Boolean [read only]
Initialize (EventName As String)
Initializes the mission operator.
IsInitialized As Boolean
LoadMission (MissionBuilder As DJIWaypointMissionBuilder)
Loads a mission. The next step is to upload it with UploadMission.
MissionState As String [read only]
Returns the mission state.
One of the following values: UNKNOWN, DISCONNECTED, NOT_SUPPORTED, RECOVERING, READY_TO_UPLOAD, UPLOADING, READY_TO_EXECUTE, EXECUTING, EXECUTION_PAUSED.
PauseMission As Object
Pauses a mission. The Result event will be raised.
ResumeMission As Object
Resumes a mission. The Result event will be raised.
StartMission As Object
Starts a mission. The Result event will be raised.
StopMission As Object
Stops a mission. The Result event will be raised.
Tag As Object
UploadMission As Object
Uploads a mission. The Result event will be raised.
Top