[View]  [Edit]  [Lock]  [References]  [Attachments]  [History]  [Home]  [Changes]  [Search]  [Help] 

app[dji8-ios] 01 Application Activation and Aircraft Binding

DJI aircraft firmware requires mobile applications that control DJI aircraft to be activated with the user's DJI account, if that application is being used in China.
This will ensure operators use the correct set of geospatial information and flight functions for their aircrafts, as determined by their geographical location and user profile.

We will guide you on how to activate your dji8 app and how to get the binding and registration state.

Read more...

Requirements

  1. dji8 app
  2. access to U8 tools and to the (phone) device connected to your aircraft.
    It will let us connect to the phone to evaluate expressions from desktop.
    Note that you can also evaluate the expressions using the U8 tools embedded in the dji8 app.

Introduction


DJI aircraft firmware requires mobile applications that control DJI aircraft to be activated with the user's DJI account, if that application is being used in China. This will ensure operators use the correct set of geospatial information and flight functions for their aircrafts, as determined by their geographical location and user profile.

To summarise the activation system:

Implementation

The following expression query states and logIn/out
self print: 'Activation state=', DJISDKManager appActivationManager appActivationStateSelector

self print: 'Binding state=', DJISDKManager appActivationManager aircraftBindingStateSelector

DJISDKManager userAccountManager
 	logIntoDJIUserAccountWithAuthorizationRequired: false
 	then: [:state :ex| self print: (ex isNil
		ifTrue: ['Login success']
		ifFalse: ['Login error: ',ex description])
	].

self print: 'Logged in as ', DJISDKManager userAccountManager loggedInDJIUserAccountName toString

DJISDKManager userAccountManager
	logOutOfDJIUserAccount: [:ex| self print: (ex isNil
		ifTrue: ['Logout success']
		ifFalse: ['Logout error: ',ex description])
	].