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.
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.
The execution callback with the returned execution result.
voidgetFlightStatistics(long startTime, long endTime, @Nullable String account, String teamId, final CommonCallbacks.CompletionCallbackWith<HistoricalFlight> callback)throws Exception
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.
Chosen start time of milliseconds.
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
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.
final String sn
Serial number of the aircraft sourcing the live view stream.