DJI Mobile SDK Documentation

      class IFlyZoneManager

      interface IFlyZoneManager
      Package:dji.v5.manager.interfaces
      Description:

      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
      Class Members:

      Fly Safety Notification

      method addFlySafeNotificationListener
      void addFlySafeNotificationListener(@NonNull FlySafeNotificationListener listener)
      Package:dji.v5.manager.interfaces
      Description:

      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.

      Supported since MSDK 5.3.0

      Input Parameters:
      @NonNull FlySafeNotificationListener listenerFly safety notification listener.
      method removeFlySafeNotificationListener
      void removeFlySafeNotificationListener(@NonNull FlySafeNotificationListener listener)
      Package:dji.v5.manager.interfaces
      Description:

      remove the listener for fly safety notification.

      Supported since MSDK 5.3.0

      Input Parameters:
      @NonNull FlySafeNotificationListener listenerFly Safety Notification listener.
      method clearAllFlySafeNotificationListener
      void clearAllFlySafeNotificationListener()
      Package:dji.v5.manager.interfaces
      Description:

      Clear all listeners for fly safety notification.

      Supported since MSDK 5.3.0

      method getFlyZonesInSurroundingArea
      void getFlyZonesInSurroundingArea(@NonNull LocationCoordinate2D location, @NonNull CommonCallbacks.CompletionCallbackWithParam<List<FlyZoneInformation>> callback)
      Package:dji.v5.manager.interfaces
      Description:

      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.


      Supported since MSDK 5.3.0

      Input Parameters:
      @NonNull LocationCoordinate2D locationSet the the central location.
      @NonNull CommonCallbacks.CompletionCallbackWithParam<List<FlyZoneInformation>> callbackReturn the callback of execution result.


      Enhanced Warning Fly Zone

      method unlockAllEnhancedWarningFlyZone
      void unlockAllEnhancedWarningFlyZone(@NonNull CommonCallbacks.CompletionCallback callback)
      Package:dji.v5.manager.interfaces
      Description:

      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.

      Supported since MSDK 5.3.0

      Input Parameters:
      @NonNull CommonCallbacks.CompletionCallback callbackReturn the callback of execution result.


      Authorization Fly Zone

      method unlockAuthorizationFlyZone
      void unlockAuthorizationFlyZone(int flyZoneID, @NonNull CommonCallbacks.CompletionCallback callback)
      Package:dji.v5.manager.interfaces
      Description:

      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.


      Supported since MSDK 5.3.0

      Input Parameters:
      int flyZoneIDAuthorization fly zone ID.
      @NonNull CommonCallbacks.CompletionCallback callbackReturn the callback of execution result.


      Restricted Fly Zone

      method downloadFlyZoneLicensesFromServer
      void downloadFlyZoneLicensesFromServer(@NonNull CommonCallbacks.CompletionCallbackWithParam<List<FlyZoneLicenseInfo>> callback)
      Package:dji.v5.manager.interfaces
      Description:

      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.


      Supported since MSDK 5.3.0

      Input Parameters:
      @NonNull CommonCallbacks.CompletionCallbackWithParam<List<FlyZoneLicenseInfo>> callbackReturn the callback of execution result.
      method getFlyZonesByAreaID
      @NonNull
      List<FlyZoneInformation> getFlyZonesByAreaID(int areaID)
      Package:dji.v5.manager.interfaces
      Description:

      Gets the restricted fly zone information for a specific areaID.

      Supported since MSDK 5.3.0

      Input Parameters:
      int areaIDRestricted fly zone ID.
      Return:
      List<FlyZoneInformation>Returns the restricted fly zone information for a specific areaID.
      method pushFlyZoneLicensesToAircraft
      void pushFlyZoneLicensesToAircraft(@NonNull CommonCallbacks.CompletionCallback callback)
      Package:dji.v5.manager.interfaces
      Description:

      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.

      Supported since MSDK 5.3.0

      Input Parameters:
      @NonNull CommonCallbacks.CompletionCallback callbackReturn the callback of execution result.
      method pullFlyZoneLicensesFromAircraft
      void pullFlyZoneLicensesFromAircraft(@NonNull CommonCallbacks.CompletionCallbackWithParam<List<FlyZoneLicenseInfo>> callback)
      Package:dji.v5.manager.interfaces
      Description:

      Gets the licenses pushed to the aircraft.

      Supported since MSDK 5.3.0

      Input Parameters:
      @NonNull CommonCallbacks.CompletionCallbackWithParam<List<FlyZoneLicenseInfo>> callbackReturn the callback of execution result.
      method deleteFlyZoneLicensesFromAircraft
      void deleteFlyZoneLicensesFromAircraft(@NonNull CommonCallbacks.CompletionCallback callback)
      Package:dji.v5.manager.interfaces
      Description:

      Delete the licenses pushed to the aircraft.

      Supported since MSDK 5.3.0

      Input Parameters:
      @NonNull CommonCallbacks.CompletionCallback callbackReturn the callback of execution result.
      method setFlyZoneLicensesEnabled
      void setFlyZoneLicensesEnabled(@NonNull FlyZoneLicenseInfo info, boolean isEnabled, @NonNull CommonCallbacks.CompletionCallback callback)
      Package:dji.v5.manager.interfaces
      Description:

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

      Supported since MSDK 5.3.0

      Input Parameters:
      @NonNull FlyZoneLicenseInfo infolicense information.
      boolean isEnabledtrue means enabled the licence.
      @NonNull CommonCallbacks.CompletionCallback callbackReturn the callback of execution result.


      Fly Safety Database

      method addFlySafeDatabaseListener
      void addFlySafeDatabaseListener(@NonNull FlySafeDatabaseListener listener)
      Package:dji.v5.manager.interfaces
      Description:

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

      Supported since MSDK 5.8.0

      Input Parameters:
      @NonNull FlySafeDatabaseListener listenerFly safety database listener.
      method removeFlySafeDatabaseListener
      void removeFlySafeDatabaseListener(@NonNull FlySafeDatabaseListener listener)
      Package:dji.v5.manager.interfaces
      Description:

      Remove the listener for fly safety database.

      Supported since MSDK 5.8.0

      Input Parameters:
      @NonNull FlySafeDatabaseListener listenerFly safety database listener.
      method clearAllFlySafeDatabaseListener
      void clearAllFlySafeDatabaseListener()
      Package:dji.v5.manager.interfaces
      Description:

      Clear all listeners for fly safety database.

      Supported since MSDK 5.8.0

      method setFlySafeDynamicDatabaseUpgradeMode
      void setFlySafeDynamicDatabaseUpgradeMode(@NonNull FlySafeDatabaseUpgradeMode flySafeDynamicDatabaseUpgradeMode , @NonNull CommonCallbacks.CompletionCallback callback)
      Package:dji.v5.manager.interfaces
      Description:

      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
      Input Parameters:
      @NonNull FlySafeDatabaseUpgradeMode flySafeDynamicDatabaseUpgradeModeFly safety dynamic database upgrade mode. Currently only supports manual import mode.
      @NonNull CommonCallbacks.CompletionCallback callbackReturn the callback of execution result.
      method importFlySafeDynamicDatabaseToMSDK
      void importFlySafeDynamicDatabaseToMSDK(String databaseFilePath, @NonNull CommonCallbacks.CompletionCallbackWithProgress<Double> callback)
      Package:dji.v5.manager.interfaces
      Description:

      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
      Input Parameters:
      String databaseFilePathDatabase file path, the database file must be in JSON format and needs to comply with the ED-269 specification.
      @NonNull CommonCallbacks.CompletionCallbackWithProgress<Double> callbackReturn the callback of execution result.
      method pushFlySafeDynamicDatabaseToAircraft
      void pushFlySafeDynamicDatabaseToAircraft(@NonNull CommonCallbacks.CompletionCallbackWithProgress<Double>  callback)
      Package:dji.v5.manager.interfaces
      Description:

      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
      Input Parameters:
      @NonNull CommonCallbacks.CompletionCallbackWithProgress<Double> callbackReturn the callback of execution result.


      enum FlySafeTipEvent
      enum FlySafeTipEvent
      Package:dji.v5.manager.aircraft.flysafe.info
      Description:

      Event enumeration of fly safety prompt information.

      Supported since MSDK 5.3.0

      Enum Members:
      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 Members:
      enum FlySafeWarningEvent
      enum FlySafeWarningEvent
      Package:dji.v5.manager.aircraft.flysafe.info
      Description:

      Event enumeration of fly safety warning information.

      Supported since MSDK 5.3.0

      Enum Members:
      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 Members:
      enum FlySafeSeriousWarningEvent
      enum FlySafeSeriousWarningEvent
      Package:dji.v5.manager.aircraft.flysafe.info
      Description:

      Event enumeration of fly safety serious warning information.

      Supported since MSDK 5.3.0

      Enum Members:
      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 Members:
      enum FlySafeReturnToHomeEvent
      enum FlySafeReturnToHomeEvent
      Package:dji.v5.manager.aircraft.flysafe.info
      Description:

      Event enumeration of fly safety return to home information.

      Supported since MSDK 5.3.0

      Enum Members:
      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 Members:
      enum FlyZoneType
      enum FlyZoneType
      Package:dji.v5.manager.aircraft.flysafe.info
      Description:

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

      Supported since MSDK 5.3.0

      Enum Members:
      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.
      Class Members:
      enum FlyZoneCategory
      enum FlyZoneCategory
      Package:dji.v5.manager.aircraft.flysafe.info
      Description:

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

      Supported since MSDK 5.3.0

      Enum Members:
      WARNINGWarning.
      ENHANCED_WARNINGEnhanced warning.
      AUTHORIZATIONauthorization fly zone.
      RESTRICTEDRestricted fly zone.
      Class Members:
      enum FlyZoneShape
      enum FlyZoneShape
      Package:dji.v5.manager.aircraft.flysafe.info
      Description:

      Restricted fly zone shape type. Includes circles and polygons.

      Supported since MSDK 5.3.0

      Enum Members:
      CIRCLEcircle.
      MULTI_POLYGONPolygon. Contains cylindrical and polygonal restricted fly zones.
      Class Members:
      enum MultiPolygonFlyZoneShape
      enum MultiPolygonFlyZoneShape
      Package:dji.v5.manager.aircraft.flysafe.info
      Description:

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

      Supported since MSDK 5.3.0

      Enum Members:
      CYLINDERCylinder.
      POLYGONPolygon.
      Class Members:
      enum RidUnlockType
      enum RidUnlockType
      Package:dji.v5.manager.aircraft.flysafe.info
      Description:

      RID unlock type.

      Supported since MSDK 5.8.0

      Enum Members:
      EUROPEANEuropean.
      CHINAChina.
      Class Members:
      enum FlySafeDatabaseUpgradeMode
      enum FlySafeDatabaseUpgradeMode
      Package:dji.v5.manager.aircraft.flysafe
      Description:

      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.

      Supported since MSDK 5.8.0

      Enum Members:
      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.
      Class Members:
      enum FlySafeDatabaseComponent
      enum FlySafeDatabaseComponent
      Package:dji.v5.manager.aircraft.flysafe
      Description:

      Fly safety database component type. Includes MSDK and aircraft.

      Supported since MSDK 5.8.0

      Enum Members:
      AIRCRAFTAircraft.
      MSDKMSDK.
      Class Members:
      enum FlySafeDatabaseState
      enum FlySafeDatabaseState
      Package:dji.v5.manager.aircraft.flysafe
      Description:

      Fly safety database state.

      Supported since MSDK 5.8.0

      Enum Members:
      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.
      Class Members: