[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.
Requirements
- dji8 app
- 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:
- Users in China are required to activate their application by logging into their DJI account at least once every three months within the application.
- Activation will be persistent in the application until the user logs out.
- An internet connection will be required to log into a DJI account.
- Outside of China, the SDK will automatically activate the application without requiring the user to log in.
- Additionally, users in China are required to bind their aircraft to their user account in DJI Go / DJI Go 4. This is required only once.
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])
].