Page Navigation

2026-11-05Loading rating…

1. Feature Overview

Page navigation lets the plugin control Pilot to jump to a specific page, or jump from Pilot back to the plugin's own page. For example, when a plugin workflow needs the user to confirm a route on Pilot's map page, or to jump from a Pilot overlay back to the plugin's main screen, this capability handles it. The target is described by an enum covering Pilot's home, map, album, waypoint mission list, and the plugin's custom pages.

1.1 Capability Overview

CapabilityDescription
Page navigationControl Pilot to jump to a specific page, or jump back to a plugin app page

1.2 Use Cases

  • Guided operation: jump to Pilot's map page during a workflow so the user can confirm a route
  • Return to plugin: jump from a Pilot overlay back to one of the plugin's Activities
  • View media: jump to Pilot's album page to view media from a specific camera

2. Interface Call Examples

The examples below assume you have completed SDK initialization and the plugin is connected to Pilot (for connection state, see the Plugin Connection State documentation). All interfaces are called through the manager singleton NavigateManager.getInstance().

2.1 Navigate to a Page (navigateToPage)

The target is described by NavigateAction: most pages need only a NavigateAction.Value enum; a few (album, plugin custom page) also pass extra info via the second parameter selfDefineValue.

val navigateManager = NavigateManager.getInstance()             // get the manager singleton

// Example 1: jump to Pilot's map page (enum only)
val toMap = NavigateAction(NavigateAction.Value.PILOT_MAP)
navigateManager.navigateToPage(toMap, object : CommonCallbacks.CompletionCallback {
    override fun onSuccess() { /* navigated */ }
    override fun onFailure(error: IDJIError) { /* error.errorCode() */ }
})

// Example 2: jump back to a plugin custom page (selfDefineValue = target Activity full path)
val toPlugin = NavigateAction(
    NavigateAction.Value.SELF_DEFINE,
    "com.example.plugin.MainActivity"                           // TODO: replace with your Activity's full path
)
navigateManager.navigateToPage(toPlugin, object : CommonCallbacks.CompletionCallback {
    override fun onSuccess() { /* jumped back to the plugin page */ }
    override fun onFailure(error: IDJIError) { /* error.errorCode() */ }
})

Available targets for NavigateAction.Value:

EnumTarget pageNote
PILOT_HOMEPilot home
PILOT_MAPPilot map page
PILOT_WAYPOINT_MISSION_LISTPilot waypoint mission list
PILOT_ALBUMPilot album pageselfDefineValue = cameraIndex, default "0"
PILOT_DEFAULTPilot current pageCommonly used for "return to Pilot"
PLUGIN_APPPlugin appJump to the plugin app
REMOTE_VIEW_PAGE_ACTIVITYPlugin custom ActivityLaunch and jump to the DJI Pilot Plugin's custom Activity
SELF_DEFINEA specified plugin pageselfDefineValue = target Activity full path
NONEEmpty / undefined

Note: Only two targets need extra info: PILOT_ALBUM (camera index) and SELF_DEFINE (Activity full path). For all other enums, use the single-argument constructor NavigateAction(value).

Preview:

页面跳转

Floating window Navigate

页面跳转

Sample Page Navigate

3. API Reference

For the full definitions of these interface methods (including parameter data models and enums), see the API documentation: INavigateManageropen in new window.

INavigateManager is the entry point of the page navigation interface, exposing the following methods:

ItemDescription
INavigateManagerEntry point of the page navigation interface
navigateToPageControl the server to navigate to a specified page

4. Sample Source Code

Page Navigation Sampleopen in new window


5. FAQ

Q1: When do I need the second parameter selfDefineValue?

Only two targets need it: PILOT_ALBUM takes the camera index (default "0"), and SELF_DEFINE takes the target Activity's full path. For all other enums, use the single-argument constructor NavigateAction(value); selfDefineValue is ignored.

Q2: What is the difference between SELF_DEFINE and REMOTE_VIEW_PAGE_ACTIVITY?

SELF_DEFINE jumps back to a specific Activity in your plugin app (pass its full path); REMOTE_VIEW_PAGE_ACTIVITY launches and jumps to the DJI Pilot Plugin's custom Activity. Choose the enum that matches the page you want to land on.

Q3: navigateToPage returns REMOTE_DISCONNECTED / EXECUTION_FAILED?

  • REMOTE_DISCONNECTED: called before the connection is ready; retry after the connection state is CONNECTED.
  • EXECUTION_FAILED: an error during the call (e.g., an invalid Activity full path for SELF_DEFINE). Verify the enum and selfDefineValue.

Appendix: Error Code Quick Reference

The error codes below come from dji.open.pilot.base.error.RemoteError:

Error code constantTriggerSuggested handling
REMOTE_DISCONNECTEDCalled before the connection is readyRetry after the connection state is CONNECTED; see Q3
EXECUTION_FAILEDAn error during the navigation callVerify the enum and selfDefineValue; see Q3
Last Updated: