DJI Mobile SDK Documentation

class TakeOffWidget

class TakeOffWidget extends ButtonWidget
Package:dji.ux.widget
Inherits From:ButtonWidget
Display:

uilib_image

Widget has three states with three different interactions.

  • White icon with arrow up indicates the aircraft is not flying and the widget interaction is to start taking off.
  • White icon with arrow down indicates the aircraft is flying and the widget interaction is to start landing.
  • Red icon indicates the aircraft is landing and the widget interaction is to cancel landing.
Interaction:

Tapping the widget will open up a Dialog to confirm the desired action. Slide the dialog from left to right to start the action.

Usage:

Preferred Aspect Ratio: 1:1 Widget needs to be in Activity context to show Dialog

Class Members:
method onTakeOffStatusChange
@MainThread
@Keep
void onTakeOffStatusChange(boolean isTakingOff)
Package:dji.ux.widget
Description:

Triggers when take off status changes.

Input Parameters:
boolean isTakingOfftrue if taking off, false otherwise
method onLandingStatusChange
@MainThread
@Keep
void onLandingStatusChange(boolean isLanding)
Package:dji.ux.widget
Description:

Triggers when landing status changes.

Input Parameters:
boolean isLandingtrue if in process of landing, false otherwise
method performTakeOffAction
@MainThread
@Keep
void performTakeOffAction()
Package:dji.ux.widget
Description:

Performs take off action @see #onTakeOffActionResult to listen on the action result by overridding

method performLandingAction
@MainThread
@Keep
void performLandingAction()
Package:dji.ux.widget
Description:

Performs landing action @see #onLandingActionResult to listen on the action result by overridding

method performCancelLandingAction
@MainThread
@Keep
void performCancelLandingAction()
Package:dji.ux.widget
Description:

Performs cancel landing action @see #onCancelLandingActionResult to listen on the action result by overridding

method performLandingConfirmationAction
void performLandingConfirmationAction()
Package:dji.ux.widget
Description:

Performs the landing confirmation action. This allows aircraft to land when landing confirmation is received.

method onTakeOffActionResult
@MainThread
@Keep
void onTakeOffActionResult(@Nullable DJIError error)
Package:dji.ux.widget
Description:

Triggers when take off action completes @see #performTakeOffAction

Input Parameters:
@Nullable DJIError errorerror object, or null if no error has occurred
method onLandingActionResult
@MainThread
@Keep
void onLandingActionResult(@Nullable DJIError error)
Package:dji.ux.widget
Description:

Triggers when landing action completes @see #performLandingAction

Input Parameters:
@Nullable DJIError errorerror object, or null if no error has occurred
method onCancelLandingActionResult
@MainThread
@Keep
void onCancelLandingActionResult(@Nullable DJIError error)
Package:dji.ux.widget
Description:

Triggers when cancel landing action completes @see #performCancelLandingAction

Input Parameters:
@Nullable DJIError errorerror object, or null if no error has occurred
method onLandingConfirmedResult
@MainThread
@Keep
void onLandingConfirmedResult(DJIError error)
Package:dji.ux.widget
Description:

Triggers when confirm landing action completes.

Input Parameters:
DJIError errorerror object, or null if no error has occurred.
method onTakeOffEnable
@MainThread
void onTakeOffEnable(boolean enabled)
Package:dji.ux.widget
Description:

Triggers when TakeOff Widget changes between being enabled or not.

Input Parameters:
boolean enabledCurrent state that is true if button is enabled.