| Package: | dji.v5.manager.interfaces |
ISDKManager
Class that is used for SDK management.
Description:
init
void init(Context context, InitSettings settings, @NonNull |
MSDK is initialized, and the MSDK internal module initialization operation is performed. After the initialization is completed, registerApp needs to be called to perform the MSDK registration operation.
MSDK will always hold a strong reference to the
SDKManagerCallback object, please do not let SDKManagerCallback to hold objects with a short life cycle in the program, such as Activity and Fragment, otherwise there will be memory leaks.Parameters
| Name | Type | Description |
|---|---|---|
context | Context | Context instance applied. |
settings | InitSettings | Initial configuration. |
callback | @NonNull | return callback of the execution result. |
init
Deprecated@Deprecated |
Deprecated, it is recommended to use the new in version 5.20.0. MSDK is initialized, and the MSDK internal module initialization operation is performed. After the initialization is completed, initregisterApp needs to be called to perform the MSDK registration operation.
MSDK will always hold a strong reference to the
SDKManagerCallback object, please do not let SDKManagerCallback to hold objects with a short life cycle in the program, such as Activity and Fragment, otherwise there will be memory leaks.Parameters
| Name | Type | Description |
|---|---|---|
context | Context | Context instance applied. |
callback | @NonNull | return callback of the execution result. |
isRegistered
boolean isRegistered() |
Get MSDK registration status. true means that the MSDK has been registered successfully.
Return
| Name | Description |
|---|---|
boolean | true means that the MSDK has been registered successfully. |
destroy
void destroy() |
Release MSDK’s occupation of resources. After release, all callback interfaces will no longer receive any event updates from the system. Note: init and destroy should appear in pairs in the App.
registerApp
void registerApp() |
MSDK registration, MSDK connects to the DJI server through the Internet to verify the App KEY applied by the developer on the official website. This method needs to be called after the INITIALIZE_COMPLETE event is returned in the onInitProcess method. Whether the registration is successful or the registration fails, it will be returned in SDKManagerCallback. After successful registration, MSDK will automatically start to connect to the hardware product. If the hardware product connection is successful, the onProductConnect method will be called back.
1. If the developer uses the offline license file method to open LDM before
registerApp, the registration operation can be completed without connecting to the Internet. 2. If you use the method of downloading the license file from the Internet to enable LDM, you need to pass in
MSDK_INIT_AND_REGISTRATION to enableLDM, in order to connect to the DJI server through the Internet to verify the App KEY and complete the registration process. 3. After MSDK is successfully registered, the registration information will be cached locally. When MSDK is started again, MSDK will verify the locally cached information to complete the registration process without connecting to the Internet. It is not necessary to perform online registration again until the application is reinstalled to complete the registration process.
getSDKVersion
String getSDKVersion() |
Get the MSDK version number.
Return
| Name | Description |
|---|---|
String | Return the MSDK version number. |
getProductCategory
PackageProductCategory getProductCategory() |
Get the MSDK package type.
Return
| Name | Description |
|---|---|
PackageProductCategory | Return the MSDK package type. |
Related:
PackageProductCategory
MSDK package type.
Enum Members
SDKManagerCallback
Since MSDK 5.0.0interface SDKManagerCallback |
SDKManager callback class.
InitSettings
Since MSDK 5.20.1class InitSettings |
MSDK initialization settings.
SDKLinKMode
MSDK link mode.
Enum Members
| Name | Description |
|---|---|
LOCAL | Local mode. |
REMOTE_PILOT | Remote Pilot mode. |
PluginAPPConfig
Since MSDK 5.20.1@Keep |
Plugin APP information configuration.
ServerState
Connection state with the remote service.
Enum Members
| Name | Description |
|---|---|
UNINITIALIZED | The service is not initialized. |
CONNECTED | Connected to the service. |
DISCONNECT | The service is disconnected. |
INCOMPATIBLE | The service version is incompatible. |
APPVersion
Since MSDK 5.20.1class APPVersion implements Parcelable |
APP version information.
OpenLocation
Since MSDK 5.20.1@Keep |
Open geographic location information, containing latitude, longitude and altitude data.