DJI Mobile SDK Documentation

class ReturnHomeWidget

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

uilib_image

Widget has two states with two different interactions.

  • White icon with arrow down indicates the aircraft is flying and the widget interaction is to start returning home.
  • Red icon indicates the aircraft is returning home and the widget interaction is to cancel returning home.
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 for showing Dialog

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

Performs return home action. @see #onReturnHomeActionResult for result of action by overridding

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

Triggers when return home action completes @see #performReturnHomeAction

Input Parameters:
@Nullable DJIError errornull means success, otherwise error object returns
method performCancelReturnHomeAction
@MainThread
@Keep
void performCancelReturnHomeAction()
Package:dji.ux.widget
Description:

Perform cancel return home action @see #onCancelReturnHomeActionResult

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

Triggers when cancel return home action completes @see #performCancelReturnHomeAction

Input Parameters:
@Nullable DJIError errornull means success, otherwise error object returns