The FlightHubManager class provides methods to interact with DJI FlightHub (https://www.dji.com/flighthub). SDK provides interfaces to upload the states of the connected aircraft to the FlightHub server and download the flight data from the server. To access DJI FlightHub features through SDK, the logged-in user should be already activated with a valid FlightHub license. Use isUserActivated to check if the user is activated. Note: Invoke updateActivationState before using any other method to verify your accessibility.
Set true to enable SDK to upload real-time flight data of the connected aircraft to DJI FlightHub server. When it is enabled, SDK will start uploading flight data automatically when the aircraft is flying. FlightHub user can access the uploaded flight data on the FlightHub online system. Stop uploading data by setting false as parameter. Use getUploadState to check current uploading state.
Input Parameters:
boolean enabled
Interval in seconds. The value should be in the range [1, 10].
Updates the logged-in user's activation state for DJI FlightHub. This method is only valid when the user is logged in. When the state is updated, the state will be cached to isUserActivated. Please invoke the authorizeAccessToDJIDeviceHardwareInfo to authorize DJI server to access DJI device's hardware information.
Input Parameters:
CompletionCallback callback
The execution callback with the returned execution result.
voidgetHistoricalFlightPath(String orderId, final CommonCallbacks.CompletionCallbackWith<List<FlightPathNode>> callback)throws Exception
Package:
dji.sdk.flighthub
Description:
Gets the flight path nodes of a historical flight path with the specific path ID. This information is only visible for the administrator of the group and the captain of the team.
Input Parameters:
String orderId
Corresponding order id that the user wants to check with the flight path.
voidgetFlightStatistics(long startTime, long endTime, @Nullable String account, String teamId, final CommonCallbacks.CompletionCallbackWith<HistoricalFlight> callback)throws Exception
Package:
dji.sdk.flighthub
Description:
Gets flight statistics over a period of time. Specify the account to get the statistics related to one user. Otherwise, statistics for the whole team will be fetched. Only ADMINISTRATOR and CAPTAIN can access the flight statistics.
Input Parameters:
long startTime
Chosen start time of milliseconds.
long endTime
Chosen end time of milliseconds.
@Nullable String account
The account that the user wants to check. Set to be null if whole team flight statistics is expected.
voidgetLiveViewStreamSource(final String sn, final CommonCallbacks.CompletionCallbackWith<LiveStream> callback)throws Exception
Package:
dji.sdk.flighthub
Description:
Gets the live view stream sourcing by the other aircraft to DJI FlightHub. The stream is using RTMP (Real-Time Messaging Protocol). External libraries are required to decode and render the live view. Only ADMINISTRATOR and CAPTAIN can do this operation.
Input Parameters:
final String sn
Serial number of the aircraft sourcing the live view stream.
Different roles of members in a FlightHub group. Different roles will have different permissions to access data in the sytem.
Enum Members:
ADMINISTRATOR
The administrator is the leader of a group (a group consists of several teams). This role will appear in the member list of all the teams and this role can access all the data of the group.
CAPTAIN
A captain is the leader of a team. ADMINISTRATOR can define a captain for a team in the group but it is not compulsory for a team to have a captain. The captain can access the data of the team.
PILOT
A pilot is a member in the team without special permissions.