DJI Mobile SDK Documentation
      Package:dji.v5.manager.interfaces
      classSince MSDK 5.3.0

      IFlyZoneManager

      Class to manage unlock fly zone, which mainly supports the following functions:

      Package dji.v5.manager.interfacesAndroid · Java / Kotlin

      Class to manage unlock fly zone, which mainly supports the following functions:

    • Get the notification about flying safety.
    • Get the fly zone around the aircraft.
    • Unlock the enhanced warning zone.
    • Unlock the authorization fly zone.
    • Unlock the restricted fly zone: download the licenses for the restricted fly zone, push the licenses to the aircraft, and enable or disable the licenses for the aircraft.
    • Fly safety database upgrade.


    • Supported since MSDK 5.3.0

      Members

      41 members

      Listener

      6

      Method

      12

      Enum

      13

      Class

      10

      Fly Safety Notification

      method

      addFlySafeNotificationListener

      void addFlySafeNotificationListener(@NonNull FlySafeNotificationListener listener)

      Add a listener for fly safety notification. Fly safety n notification information includes: tips information, return home information, warning information, serious warning information, and fly zone near the aircraft.

      Parameters

      NameTypeDescription
      listener@NonNull FlySafeNotificationListener Fly safety notification listener.
      method

      removeFlySafeNotificationListener

      void removeFlySafeNotificationListener(@NonNull FlySafeNotificationListener listener)

      remove the listener for fly safety notification.

      Parameters

      NameTypeDescription
      listener@NonNull FlySafeNotificationListener Fly Safety Notification listener.
      method

      clearAllFlySafeNotificationListener

      void clearAllFlySafeNotificationListener()

      Clear all listeners for fly safety notification.

      method

      getFlyZonesInSurroundingArea

      void getFlyZonesInSurroundingArea(@NonNull LocationCoordinate2D location, @NonNull CommonCallbacks.CompletionCallbackWithParam<List<FlyZoneInformation>> callback)

      Gets the fly zones within 50 kilometers from the central location.

      Note

      If there are too many fly zones obtained, drawing the fly zones on the map may cause ANR problems. It is recommended to optimize the display.

      Parameters

      NameTypeDescription
      location@NonNull LocationCoordinate2D Set the the central location.
      callback@NonNull CommonCallbacks.CompletionCallbackWithParam<List<FlyZoneInformation>> Return the callback of execution result.


      Enhanced Warning Fly Zone

      method

      unlockAllEnhancedWarningFlyZone

      void unlockAllEnhancedWarningFlyZone(@NonNull CommonCallbacks.CompletionCallback callback)

      Unlock all enhanced warning fly zones. After unlocking, the aircraft will no longer prompt any enhanced warning zone, and will continue to warn after reboot the aircraft.

      Parameters

      NameTypeDescription
      callback@NonNull CommonCallbacks.CompletionCallback Return the callback of execution result.


      Authorization Fly Zone

      method

      unlockAuthorizationFlyZone

      void unlockAuthorizationFlyZone(int flyZoneID, @NonNull CommonCallbacks.CompletionCallback callback)

      Unlock the authorization fly zone. After unlocking the authorization fly zone, the aircraft will be able to take off normally in the authorization fly zone.

      Note

      M300 RTK, M350 RTK, M30 series, M3E series and other enterprise aircraft can be directly transferred to flyZoneID to unlock the authorized area, and the authorization fly zone will continue to be banned after reboot the aircraft.
      DJI Mini 3 and DJI Mini 3 Pro and other consumer aircraft, you need to refer to the unlocking process of the restricted fly zone. After applying for unlocking on the official website of DJI, call downloadFlyZoneLicensesFromServer and pushFlyZoneLicensesToAircraft to unlock the authorization fly zone.

      Parameters

      NameTypeDescription
      flyZoneIDint Authorization fly zone ID.
      callback@NonNull CommonCallbacks.CompletionCallback Return the callback of execution result.


      Restricted Fly Zone

      method

      downloadFlyZoneLicensesFromServer

      void downloadFlyZoneLicensesFromServer(@NonNull CommonCallbacks.CompletionCallbackWithParam<List<FlyZoneLicenseInfo>> callback)

      Gets the licenses for restricted fly zone from the server. In order to get the unlock licenses for the relevant account, please call logInDJIUserAccount to log in to the DJI account first,

      Note

      If you want to draw the restricted fly zone in the license on the map, please pass the areaID in the restricted fly zone to getFlyZonesByAreaID, then you can get the restricted fly zone information of the areaID for drawing.

      Parameters

      NameTypeDescription
      callback@NonNull CommonCallbacks.CompletionCallbackWithParam<List<FlyZoneLicenseInfo>> Return the callback of execution result.
      method

      getFlyZonesByAreaID

      @NonNull
      List<FlyZoneInformation> getFlyZonesByAreaID(int areaID)

      Gets the restricted fly zone information for a specific areaID.

      Parameters

      NameTypeDescription
      areaIDint Restricted fly zone ID.

      Return

      NameDescription
      List<FlyZoneInformation>Returns the restricted fly zone information for a specific areaID.
      method

      pushFlyZoneLicensesToAircraft

      void pushFlyZoneLicensesToAircraft(@NonNull CommonCallbacks.CompletionCallback callback)

      Push the unlock licenses into the aircraft. MSDK will push the licenses matching the SN of the flight controller into the aircraft.
      After the push is successful, you can call pullFlyZoneLicensesFromAircraft to get the list of licenses that have been pushed to the aircraft. If you need to unlock the restricted zone, you can call setFlyZoneLicensesEnabled to enable or disable the unlock licenses.

      Parameters

      NameTypeDescription
      callback@NonNull CommonCallbacks.CompletionCallback Return the callback of execution result.
      method

      pullFlyZoneLicensesFromAircraft

      void pullFlyZoneLicensesFromAircraft(@NonNull CommonCallbacks.CompletionCallbackWithParam<List<FlyZoneLicenseInfo>> callback)

      Gets the licenses pushed to the aircraft.

      Parameters

      NameTypeDescription
      callback@NonNull CommonCallbacks.CompletionCallbackWithParam<List<FlyZoneLicenseInfo>> Return the callback of execution result.
      method

      deleteFlyZoneLicensesFromAircraft

      void deleteFlyZoneLicensesFromAircraft(@NonNull CommonCallbacks.CompletionCallback callback)

      Delete the licenses pushed to the aircraft.

      Parameters

      NameTypeDescription
      callback@NonNull CommonCallbacks.CompletionCallback Return the callback of execution result.
      method

      setFlyZoneLicensesEnabled

      void setFlyZoneLicensesEnabled(@NonNull FlyZoneLicenseInfo info, boolean isEnabled, @NonNull CommonCallbacks.CompletionCallback callback)

      Enable or disable unlock license. After enabling the license, the aircraft will be able to take off normally in the restricted fly zone.

      Parameters

      NameTypeDescription
      info@NonNull FlyZoneLicenseInfo license information.
      isEnabledboolean true means enabled the licence.
      callback@NonNull CommonCallbacks.CompletionCallback Return the callback of execution result.


      Fly Safety Database

      method

      addFlySafeDatabaseListener

      void addFlySafeDatabaseListener(@NonNull FlySafeDatabaseListener listener)

      Add a listener for the fly safety database. Fly safety database information includes: database upgrade mode, database upgrade status, and manually imported database information.

      Parameters

      NameTypeDescription
      listener@NonNull FlySafeDatabaseListener Fly safety database listener.
      method

      removeFlySafeDatabaseListener

      void removeFlySafeDatabaseListener(@NonNull FlySafeDatabaseListener listener)

      Remove the listener for fly safety database.

      Parameters

      NameTypeDescription
      listener@NonNull FlySafeDatabaseListener Fly safety database listener.
      method

      clearAllFlySafeDatabaseListener

      void clearAllFlySafeDatabaseListener()

      Clear all listeners for fly safety database.

      method

      setFlySafeDynamicDatabaseUpgradeMode

      void setFlySafeDynamicDatabaseUpgradeMode(@NonNull FlySafeDatabaseUpgradeMode flySafeDynamicDatabaseUpgradeMode , @NonNull CommonCallbacks.CompletionCallback callback)

      Set the upgrade mode of the fly safety dynamic database. Currently, only manual import of EU GeoZone data is supported. If you want to fly your drone compliantly in the EU, please refer to the following process to import EU GeoZone data into the aircraft.

    • Check European Aviation Safety Agency official website to download GeoZone data and import it into the aircraft.< /li>
    • Call setFlySafeDynamicDatabaseUpgradeMode to set the fly safety dynamic database upgrade mode to manual import mode.
    • Call importFlySafeDynamicDatabaseToMSDK to import GeoZone data into MSDK.
    • Call pushFlySafeDynamicDatabaseToAircraft to synchronize GeoZone data to the aircraft.
    • Call getFlyZonesInSurroundingArea to obtain GeoZone data within a range of 50 kilometers centered on the aircraft.


    • Supported since MSDK 5.8.0

      Parameters

      NameTypeDescription
      flySafeDynamicDatabaseUpgradeMode@NonNull FlySafeDatabaseUpgradeMode Fly safety dynamic database upgrade mode. Currently only supports manual import mode.
      callback@NonNull CommonCallbacks.CompletionCallback Return the callback of execution result.
      method

      importFlySafeDynamicDatabaseToMSDK

      void importFlySafeDynamicDatabaseToMSDK(String databaseFilePath, @NonNull CommonCallbacks.CompletionCallbackWithProgress<Double> callback)

      Import the fly safety dynamic database into the MSDK. Currently, only only support to import the EU GeoZone data. If you want to fly your drone compliantly in the EU, please refer to the following process to import EU GeoZone data into the aircraft.

    • Check European Aviation Safety Agency official website to download GeoZone data and import it into the aircraft.< /li>
    • Call setFlySafeDynamicDatabaseUpgradeMode to set the fly safety dynamic database upgrade mode to manual import mode.
    • Call importFlySafeDynamicDatabaseToMSDK to import GeoZone data into MSDK.
    • Call pushFlySafeDynamicDatabaseToAircraft to synchronize GeoZone data to the aircraft.
    • Call getFlyZonesInSurroundingArea to obtain GeoZone data within a range of 50 kilometers centered on the aircraft.


    • Supported since MSDK 5.8.0

      Parameters

      NameTypeDescription
      databaseFilePathString Database file path, the database file must be in JSON format and needs to comply with the ED-269 specification.
      callback@NonNull CommonCallbacks.CompletionCallbackWithProgress<Double> Return the callback of execution result.
      method

      pushFlySafeDynamicDatabaseToAircraft

      void pushFlySafeDynamicDatabaseToAircraft(@NonNull CommonCallbacks.CompletionCallbackWithProgress<Double>  callback)

      Synchronize the fly safety dynamic database to the aircraft. Currently only support to synchronize the EU GeoZone data. If you want to fly your drone compliantly in the EU, please refer to the following process to import EU GeoZone data into the aircraft.

    • Check European Aviation Safety Agency official website to download GeoZone data and import it into the aircraft.< /li>
    • Call setFlySafeDynamicDatabaseUpgradeMode to set the fly safety dynamic database upgrade mode to manual import mode.
    • Call importFlySafeDynamicDatabaseToMSDK to import GeoZone data into MSDK.
    • Call pushFlySafeDynamicDatabaseToAircraft to synchronize GeoZone data to the aircraft.
    • Call getFlyZonesInSurroundingArea to obtain GeoZone data within a range of 50 kilometers centered on the aircraft.


    • Supported since MSDK 5.8.0

      Parameters

      NameTypeDescription
      callback@NonNull CommonCallbacks.CompletionCallbackWithProgress<Double> Return the callback of execution result.


      enum

      FlySafeTipEvent

      Event enumeration of fly safety prompt information.

      Enum Members

      NameDescription
      TAKE_OFF_IN_HEIGHT_LIMIT_ZONE_WITHOUT_GPSThe aircraft is below the height limit zone and has no GPS signal, please pay attention to flight safety.
      TAKE_OFF_IN_HEIGHT_LIMIT_ZONEThe aircraft is below the height limit zone, please pay attention to flight safety.
      TAKE_OFF_IN_WARNING_AREAThe aircraft is in the warning zone, please pay attention to flight safety.
      TOUCH_NO_FLY_ZONEThe aircraft has touched the no-fly zone, please control the aircraft as far as possible.
      TOUCH_AUTHORIZATION_ZONEThe aircraft has touched the authorized area, please control the aircraft as far as possible.
      REACH_MAXIMUM_FLIGHT_HEIGHTThe aircraft has reached the maximum flight height in the height limit zone.
      RTH_AFFECTED_AT_BOUNDARY_OF_GEO_ZONEYour aircraft is at the boundary of a limited fly zone, Return To Home may be affected. Please fly away with caution.
      AT_BOUNDARY_OF_CUSTOM_UNLOCK_ZONEYour aircraft is at the boundary of an Custom Unlocking Zone.
      ENTER_LIMIT_HEIGHT_AREAThe aircraft has entered the height limited area.
      COLLISION_WITH_LIMIT_HEIGHT_AREA_SOON_IN_WHITE_LIST_VALID_AREAThe aircraft is approaching the fly zone, please pay attention to flight safety.
      class

      FlySafeTipInformation

      Since MSDK 5.3.0
      class FlySafeTipInformation

      Fly safety tips information.

      enum

      FlySafeWarningEvent

      Event enumeration of fly safety warning information.

      Enum Members

      NameDescription
      TAKE_OFF_FAILED_IN_NO_FLY_ZONEThe aircraft was unable to take off in the no-fly zone.
      TAKE_OFF_FAILED_IN_NO_FLY_ZONE_WITHOUT_GPSThe mobile device is in the no-fly zone, and the GPS signal of the aircraft is not good enough to take off.
      TAKE_OFF_FAILED_WITHOUT_CUSTOM_UNLOCKINGCannot take off. You have not applied to fly in this zone.
      TAKE_OFF_FAILED_IN_AUTHORIZED_AREA_WITHOUT_GPS_AND_UNLOCKINGThe mobile device is in the authorized area, and the GPS signal of the aircraft is not good, and it cannot take off before unlocking.
      TAKE_OFF_FAILED_IN_AUTHORIZED_ZONE_WITHOUT_UNLOCKINGThe aircraft is not allowed to take off before being unlocked in the authorized area.
      TAKE_OFF_FAILED_IN_AUTHORIZED_ZONEThe aircraft is in the authorized area and you have obtained a fly license.
      TAKE_OFF_IN_ENHANCED_WARNING_ZONEThe aircraft is in the enhanced warning zone, please pay attention to fly safety.
      TAKE_OFF_NEAR_NO_FLY_ZONEThere is a no-fly zone nearby and there are fly restrictions.
      LIMITED_RESTRICTIONS_NEARBYThere are limited restrictions in the nearby area.
      AUTHORIZED_ZONE_WITHOUT_UNLOCKING_NEARBYThere is a authorized zone nearby and there are flight restrictions.
      AUTHORIZED_ZONE_AND_RESTRICTIONS_NEARBYThere are authorized areas nearby and you have obtained a flight certificate.
      RESTRICTIONS_IN_LIMITED_FLY_ZONE_NEARBYThere are flight restrictions in the nearby limited flight area.
      IN_AUTHORIZATION_ZONEThe aircraft is in the authorized area and you have obtained a flight certificate.
      TAKE_OFF_FAILED_UNDER_LIMIT_AREA_WITH_GPS_ONCEThe mobile device is in the no-fly zone, and the GPS signal of the aircraft is not good enough to take off.
      HAVE_ONE_HOUR_WILL_APPLY_TFRSAfter 1 hour, a temporary restricted flight zone will take effect within 7KM, please pay attention to flight safety.
      class

      FlySafeWarningInformation

      Since MSDK 5.3.0
      class FlySafeWarningInformation

      Fly safety warning information.

      enum

      FlySafeSeriousWarningEvent

      Event enumeration of fly safety serious warning information.

      Enum Members

      NameDescription
      IN_NO_FLY_ZONEThe aircraft is in the no-fly zone. After the countdown is over, it will force an automatic drop. You will not be able to control the throttle, but you can adjust the horizontal direction to avoid obstacles.
      IN_LIMIT_HEIGHT_AREAThe aircraft is in the height limit zone. After the countdown is over, it will automatically drop to the limit height, you will not be able to control the throttle, but you can adjust the horizontal direction to avoid obstacles.
      IN_AUTHORIZATION_ZONE_WITHOUT_UNLOCKINGThe aircraft is in the authorized area. After the countdown is over, it will automatically drop to the limit height, you will not be able to control the throttle, but you can adjust the horizontal direction to avoid obstacles.
      HAVE_THREE_MIN_WILL_APPLY_TFRSThree minutes later, a temporary restricted flight zone will take effect nearby, please pay attention to fly safety.
      class

      FlySafeSeriousWarningInformation

      Since MSDK 5.3.0
      class FlySafeSeriousWarningInformation

      Fly safety serious warning information.

      enum

      FlySafeReturnToHomeEvent

      Event enumeration of fly safety return to home information.

      Enum Members

      NameDescription
      NEAR_NO_FLY_ZONEApproaching a No-Fly Zone. Return to home may be affected. Fly with caution.
      CROSS_NO_FLY_ZONECurrent Return to home route will pass a No-Fly zone. Pay attention to the aircraft's position to avoid Return to home failure.
      class

      FlySafeReturnToHomeInformation

      Since MSDK 5.3.0
      class FlySafeReturnToHomeInformation

      Fly safety return to home information.

      enum

      FlySafeLicenseType

      Type of flysafe license.

      Enum Members

      NameDescription
      GEO_UNLOCKGEO unlock.
      CIRCLE_UNLOCK_AREACircle unlock.
      COUNTRY_UNLOCKCountry unlock.
      PARAMETER_CONFIGURATIONLimite height unlock.
      PENTAGON_UNLOCK_AREAPolygon unlock.
      POWER_UNLOCKPower unlock.
      RID_UNLOCKRID unlock.
      UNKNOWNunkonw.
      enum

      FlyZoneType

      Type of restricted fly zone. Including airports, parks, schools, stadium, etc.

      Enum Members

      NameDescription
      AIRPORTAirport.
      COMMERCIAL_AIRPORTSCommercial airport.
      PRIVATE_COMMERCIAL_AIRPORTSPrivate commercial airport.
      RECREATIONAL_AIRPORTSRecreational airport.
      PRIVATE_RECREATIONAL_AIRPORTSPrivate recreational airport.
      HELIPORTHeliport.
      UNPAVED_AIRPORTUnpaved airport.
      NATIONAL_PARKSNational park.
      NOAANOAA.
      PARCELPost office.
      POWER_PLANTPower plant.
      SCHOOLSchool.
      STADIUMstadium.
      NUCLEAR_POWER_PLANTNuclear power plant.
      PROHIBITED_SPECIAL_USESpecial Use.
      RESTRICTED_SPECIAL_USESpecial Use.
      SPECIALSpecial fly zone.
      TEMPORARY_FLIGHT_RESTRICTIONSTemporary flight restriction.
      CLASS_B_AIR_SPACEClass B controlled airspace. See http://www.dji.com/flysafe/geo-system#notes for more information on the controlled airspace (Class B, C, D, E) in the United States.
      CLASS_C_AIR_SPACEClass C controlled airspace. See http://www.dji.com/flysafe/geo-system#notes for more information on the controlled airspace (Class B, C, D, E) in the United States.
      CLASS_D_AIR_SPACEClass D controlled airspace. See http://www.dji.com/flysafe/geo-system#notes for more information on the controlled airspace (Class B, C, D, E) in the United States.
      CLASS_E_AIR_SPACEClass E controlled airspace. See http://www.dji.com/flysafe/geo-system#notes for more information on the controlled airspace (Class B, C, D, E) in the United States.
      PRISONPrison.
      MILITARYMilitary.
      enum

      FlyZoneCategory

      Restricted Fly Zone category. Including restricted zone, authorization zone, warning zone and enhanced warning zone, etc.

      Enum Members

      NameDescription
      WARNINGWarning.
      ENHANCED_WARNINGEnhanced warning.
      AUTHORIZATIONauthorization fly zone.
      RESTRICTEDRestricted fly zone.
      enum

      FlyZoneShape

      Restricted fly zone shape type. Includes circles and polygons.

      Enum Members

      NameDescription
      CIRCLEcircle.
      MULTI_POLYGONPolygon. Contains cylindrical and polygonal restricted fly zones.
      enum

      MultiPolygonFlyZoneShape

      The shape type of polygonal restricted fly zone. Includes cylinders and polygons.

      Enum Members

      NameDescription
      CYLINDERCylinder.
      POLYGONPolygon.
      class

      MultiPolygonFlyZoneInformation

      Since MSDK 5.3.0
      class MultiPolygonFlyZoneInformation

      Polygon restricted fly zone information.

      class

      FlyZoneInformation

      Since MSDK 5.3.0
      final class FlyZoneInformation

      Restricted fl zone information class.

      class

      FlyZoneLicenseInfo

      Since MSDK 5.3.0
      class FlyZoneLicenseInfo implements KeepProguard

      Restricted fly zone licenses class.

      enum

      RidUnlockType

      RID unlock type.

      Enum Members

      NameDescription
      EUROPEANEuropean.
      CHINAChina.
      class

      FlySafeNotificationListener

      Since MSDK 5.3.0
      interface FlySafeNotificationListener

      Fly safety notification listener.

      class

      FlySafeDatabaseListener

      Since MSDK 5.8.0
      interface FlySafeDatabaseListener

      Fly safety database listener.

      class

      FlySafeDatabaseInfo

      Since MSDK 5.8.0
      class FlySafeDatabaseInfo

      Fly safety database information class.

      enum

      FlySafeDatabaseUpgradeMode

      Fly safety database upgrade mode. Includes manual import and automatic upgrade. MSDK only supports manual import mode. If you need to use automatic upgrade mode, please use DJI official APP.

      Enum Members

      NameDescription
      MANUAL_IMPORTManual import mode. MSDK only supports manual upgrade mode. If you need to use automatic upgrade mode, please use the DJI official APP.
      AUTOMATIC_UPGRADEAutomatic upgrade mode. MSDK only supports manual upgrade mode. If you need to use automatic upgrade mode, please use the DJI official APP. The automatic update mode can only be used as a supplement for fly safety. If you want to fly your aircraft compliantly in the EU, please refer to manually importing EU GeoZone data into the aircraft.
      enum

      FlySafeDatabaseComponent

      Fly safety database component type. Includes MSDK and aircraft.

      Enum Members

      NameDescription
      AIRCRAFTAircraft.
      MSDKMSDK.
      enum

      FlySafeDatabaseState

      Fly safety database state.

      Enum Members

      NameDescription
      NEED_TO_IMPORTNeed to import. Indicates that the current database of MSDK does not contain data on the current position of the aircraft. Please call importFlySafeDynamicDatabaseToMSDK to import the database near the aircraft location.
      NEED_TO_SYNCNeed to synchronize. Indicates that the database in MSDK needs to be synchronized to the aircraft. Please call pushFlySafeDynamicDatabaseToAircraft to push the database in MSDK to the aircraft.
      UP_TO_DATEUp to date. Indicates that the MSDK database has been successfully synchronized to the aircraft.