DJI Mobile SDK Documentation

      class DJISDKError

      @EXClassNullAway
      class DJISDKError extends DJIError
      Package:dji.common.error
      Inherits From:DJIError
      Description:

      DJI SDK Error.

      Class Members:
      final FEATURE_NOT_SUPPORTED
      static final DJISDKError FEATURE_NOT_SUPPORTED = new DJISDKError("This feature is not supported in the SDK")
      Package:dji.common.error
      Description:

      Feature not supported error.

      final APPLICATION_NOT_ACTIVATED
      static final DJISDKError APPLICATION_NOT_ACTIVATED = new DJISDKError("Application is not registered")
      Package:dji.common.error
      Description:

      Application not activated error.

      final SYSTEM_BUSY
      static final DJISDKError SYSTEM_BUSY = new DJISDKError("System is busy, please retry later")
      Package:dji.common.error
      Description:

      System busy error.

      final INVALID_PARAMETERS
      static final DJISDKError INVALID_PARAMETERS = new DJISDKError("The parameters are invalid. Please review and submit the request")
      Package:dji.common.error
      Description:

      Parameters invalid error.

      final PARAMETER_GET_FAILED
      static final DJISDKError PARAMETER_GET_FAILED = new DJISDKError("Getting parameters operation failed")
      Package:dji.common.error
      Description:

      Get parameter failed error.

      final PARAMETER_SET_FAILED
      static final DJISDKError PARAMETER_SET_FAILED = new DJISDKError("Setting parameters operation failed")
      Package:dji.common.error
      Description:

      Setting parameters operation failed.

      final COMMAND_EXECUTION_FAILED
      static final DJISDKError COMMAND_EXECUTION_FAILED =
      new DJISDKError("There was an error executing the command")
      Package:dji.common.error
      Description:

      Command execute failed error.

      final SEND_DATA_FAILED
      static final DJISDKError SEND_DATA_FAILED = new DJISDKError("There was an error sending the data")
      Package:dji.common.error
      Description:

      Send data failed error.

      final CONNECTION_TO_SDK_FAILED
      static final DJISDKError CONNECTION_TO_SDK_FAILED =
      new DJISDKError("There was an error connecting to the SDK")
      Package:dji.common.error
      Description:

      Connection to SDK failed error.

      final NOT_DEFINED
      static final DJISDKError NOT_DEFINED = new DJISDKError("Not defined error.")
      Package:dji.common.error
      Description:

      Not defined error.

      final COULD_NOT_CONNECT_TO_INTERNET
      static final DJISDKError COULD_NOT_CONNECT_TO_INTERNET =
      new DJISDKError("For first time registration, app should be connected to Internet.")
      Package:dji.common.error
      Description:

      The application is not able to connect to the Internet the first time it tries to register the API Key.

      final INVALID_APP_KEY
      static final DJISDKError INVALID_APP_KEY =
      new DJISDKError("The app key submitted is invalid. Please check the app key you provided.")
      Package:dji.common.error
      Description:

      The application key you provided is incorrect.

      final HTTP_TIMEOUT
      static final DJISDKError HTTP_TIMEOUT = new DJISDKError("The server may be busy or is not reachable.")
      Package:dji.common.error
      Description:

      The network you are trying to reach is busy, or the server is unreachable.

      final DEVICE_NOT_MATCH
      static final DJISDKError DEVICE_NOT_MATCH =
      new DJISDKError("Attempt to copy metadata from another registered device is not permitted.")
      Package:dji.common.error
      Description:

      The attempt to copy metadata from another registered device to a device that is currently connected is not permitted. For example, if a developer has two devices and the application is activated with the app key on one of the devices and if the other device is plugged in and tries to register the application, this error will occur.

      final BUNDLE_NOT_MATCH
      static final DJISDKError BUNDLE_NOT_MATCH = new DJISDKError(
      "The bundle identifier of your app should be identical to the one you registered on the website.")
      Package:dji.common.error
      Description:

      The bundle identifier of your application does not match the bundle identifier you registered on the developer website when you applied to obtain an application key.

      final APP_KEY_PROHIBITED
      static final DJISDKError APP_KEY_PROHIBITED =
      new DJISDKError("The app key is prohibited, please contact <dev@dji.com> for help.")
      Package:dji.common.error
      Description:

      The application key is prohibited. This occurs when an application key that has already been released by DJI is revoked. Please contact DJI for assistance.

      final MAX_ACTIVATION_COUNT_REACHED
      static final DJISDKError MAX_ACTIVATION_COUNT_REACHED =
      new DJISDKError("The app key reached maximum number of activations, please contact <dev@dji.com> for help.")
      Package:dji.common.error
      Description:

      There is a maximum number of devices one application key can be used to activate. The maximum number of devices is given when an application is registered on the DJI developer website. This error will occur if the maximum number of activations has been reached.

      final APP_KEY_INVALID_PLATFORM
      static final DJISDKError APP_KEY_INVALID_PLATFORM =
      new DJISDKError("The app key is not valid for this platform.")
      Package:dji.common.error
      Description:

      This error occurs when an application key was given for a specific platform and is trying to be used to activate an application for another platform. For instance, if an application key was given for an iOS application and is used to activate an Android application, this error will occur.

      final APP_KEY_NOT_EXIST
      static final DJISDKError APP_KEY_NOT_EXIST =
      new DJISDKError("The app key does not exist. Please check the app key you provided.")
      Package:dji.common.error
      Description:

      The application key does not exist. Please make sure the application key you are entering is correct.

      final APP_KEY_LEVEL_NOT_PERMITTED
      static final DJISDKError APP_KEY_LEVEL_NOT_PERMITTED =
      new DJISDKError("The app key does not have the required permission.")
      Package:dji.common.error
      Description:

      There are two levels for the SDK framework, level 1 and level 2. If an application key was given under one level and is trying to be used to active an application using another level SDK framework, this error will occur.

      final SERVER_PARSE_FAILURE
      static final DJISDKError SERVER_PARSE_FAILURE =
      new DJISDKError("Server error, please contact <dev@dji.com> for help.")
      Package:dji.common.error
      Description:

      There is a server error. Please contact DJI for assistance.

      final SERVER_WRITE_FAILURE
      static final DJISDKError SERVER_WRITE_FAILURE =
      new DJISDKError("Server error, please contact <dev@dji.com> for help.")
      Package:dji.common.error
      Description:

      There is a server error. Please contact DJI for assistance.

      final SERVER_DATA_ABNORMAL
      static final DJISDKError SERVER_DATA_ABNORMAL =
      new DJISDKError("Server error, please contact <dev@dji.com> for help.")
      Package:dji.common.error
      Description:

      There is a server error. Please contact DJI for assistance.

      final INVALID_METADATA
      static final DJISDKError INVALID_METADATA =
      new DJISDKError("The metadata received from server is invalid, please reconnect to the server and try.")
      Package:dji.common.error
      Description:

      The activation data received from server is invalid. Please reconnect to the internet and try again.

      final EMPTY_APP_KEY
      static final DJISDKError EMPTY_APP_KEY = new DJISDKError("The app key was not provided.")
      Package:dji.common.error
      Description:

      No application key was provided.

      final OVER_MAX_ACTIVATIONS_COUNT
      static final DJISDKError OVER_MAX_ACTIVATIONS_COUNT =
      new DJISDKError("SDK user who do not have the professional membership only could have the maximum of 20 unique activations.")
      Package:dji.common.error
      Description:

      Applications under basic develop account could only have the maximum of 20 unique activations. Visit DJI developer center https://developer.dji.com/user/membership/ to upgrade the membership.

      final UNKNOWN
      static final DJISDKError UNKNOWN = new DJISDKError("Unknown error occurred during registration")
      Package:dji.common.error
      Description:

      An unknown error occurred when the application was trying to register. Please contact DJI for assistance.

      final REGISTRATION_AESENCRYPT_FAILED
      static final DJISDKError REGISTRATION_AESENCRYPT_FAILED =
      new DJISDKError("Server error, please contact <dev@dji.com> for help")
      Package:dji.common.error
      Description:

      Server error, please contact https://djisdksupport.zendesk.com/hc/requests/new for help.

      final REGISTRATION_AESENCRYPT_ERROR
      static final DJISDKError REGISTRATION_AESENCRYPT_ERROR =
      new DJISDKError("Server error, please contact <dev@dji.com> for help.")
      Package:dji.common.error
      Description:

      Server error, please contact https://djisdksupport.zendesk.com/hc/requests/new for help.

      final REGISTRATION_INVALID_UUID
      static final DJISDKError REGISTRATION_INVALID_UUID =
      new DJISDKError("Server error, please contact <dev@dji.com> for help.")
      Package:dji.common.error
      Description:

      Server error, please contact https://djisdksupport.zendesk.com/hc/requests/new for help.


      Members

      final DEVICE_NOT_FOUND
      static final DJISDKError DEVICE_NOT_FOUND = new DJISDKError("Device is not connected or does not exist.")
      Package:dji.common.error
      Description:

      Device not found.

      final APP_KEY_NOT_ENROLLED_BY_BETA_SDK
      static final DJISDKError APP_KEY_NOT_ENROLLED_BY_BETA_SDK = new DJISDKError("The application is not enrolled in the Beta Program. Use an app key under the Beta Program instead.")
      Package:dji.common.error
      Description:

      The application is not enrolled in the Beta Program. Use an app key under the Beta Program instead.

      final INVALID_APP_KEY_FOR_BETA_VERSION
      static final DJISDKError INVALID_APP_KEY_FOR_BETA_VERSION = new DJISDKError("The app key is invalid for this beta version.")
      Package:dji.common.error
      Description:

      The app key is invalid for this beta version.

      final DOWNLOAD_FLYSAFE_DATABASE_FAILED_WITH_LDM_ON
      static final DJISDKError DOWNLOAD_FLYSAFE_DATABASE_FAILED_WITH_LDM_ON =
      new DJISDKError("Download fly safe database failed. Please disable LDM to retry to register " +
      "\"or check if \"fly-safe-database\" is excluded in build.gradle\".")
      Package:dji.common.error
      Description:

      Download flysafe database failed. You can close LDM model to retry register App or implementation "FlySafeDataBase-release.aar" in your app build.gradle before compile it.

      final SDK_VERSION_BLOCKED
      static final DJISDKError SDK_VERSION_BLOCKED = new DJISDKError("The sdk version is blocked")
      Package:dji.common.error
      Description:

      SDK Version is blocked.

      final ACTIVATE_FAILED
      static final DJISDKError ACTIVATE_FAILED = new DJISDKError("The app activation failed")
      Package:dji.common.error
      Description:

      App activation failed.

      final APP_KEY_BLOCKED
      static final DJISDKError APP_KEY_BLOCKED = new DJISDKError("The app key is blocked")
      Package:dji.common.error
      Description:

      App key is blocked.

      final CAN_NOT_EXECUTE
      static final DJISDKError CAN_NOT_EXECUTE = new DJISDKError("The operation can't be executed in current state.")
      Package:dji.common.error
      Description:

      The operation can't be executed in current state.

      Inherited Methods:
      dji.common.error.DJIError
      method
      method getDJIError
      static DJIError getDJIError(int errorCode)
      Package:dji.common.error
      Description:

      Returns the specific error in the DJIFlightHubError according to the error code.

      Input Parameters:
      int errorCodeerrorCode for DJIFlightHubError.
      Return:
      static DJIErrorAn NSError object initialized with errorCode. If the errorCode was 0, returns nil.
      method getDJIError
      static DJIError getDJIError(int errorCode)
      Package:dji.sdk.utmiss
      Description:

      Get DJIUTMISSError.

      Input Parameters:
      int errorCodeAn int value of error code.
      Return:
      static DJIErrorAn object of DJIError.
      method getDescription
      String getDescription()
      Package:dji.common.error
      Description:

      Returns the description of the error code.

      Return:
      StringThe description of the error code.
      method setDescription
      void setDescription(String desc)
      Package:dji.common.error
      Description:

      Sets the description for the error code.

      Input Parameters:
      String descDescription string.