IWaypointMissionManager#pushKMZFileToAircraft fails

Completed

Comments

7 comments

  • Alexis Glass

    I have tested the same kmz using the (somewhat hidden) `JNIWPMZManager`'s `checkWPMZValid()` method, and no problems were reported.

    0
    Comment actions Permalink
  • DJI Developer Support
    This is because from the Android 10, the permission of Android storage has been change. When I am testing, I just copy the kmz file into the root directory of my RC. You can check online about the Android 10 storage location change log on Google.
    0
    Comment actions Permalink
  • Alexis Glass

    Thank you for the response.

    I am placing the kmz at a file location similar to what follows:

    /storage/emulated/0/Android/data/com.aaaa.bbbbbb/files/Some/Directory/Names/bbbbbb-60ef215f898b05870daf2f3f89173685.kmz

    The application with the package name `com.aaaa.bbbbbb` should need no special permissions to access this file on Android 10; likewise for any code in Mobile SDKv5. Is it nevertheless necessary for the file to be located at a location where permissions would be required?

    0
    Comment actions Permalink
  • DJI Developer Support
    It should be fine because you have put it into Android/data section. Try move the kmz to the root directory and see what's going on to ensure if the issue comes from the Android read/write permissions. I normally test undet the root directory.
    0
    Comment actions Permalink
  • Alexis Glass

    Thank you for your response.

    I had created the kmz after following these instructions in the FAQ:

    Q: Wju the kmz file contains both kml and wpml files and their functionalities are similar?

    A: If you are using DJI Pilot 2, your kmz must contain the template.kml file, you don't need the waylines.wpml file. The DJI Pilot 2 app will translate the template.kml file to the waylines.wpml file. The firmware will execute the waylines.wpml file only. If you are using MSDK V5, your kmz file must contain the waylines.wpml file. The firmware will execute the waylines.wpml file after the upload event. If you want to run your kmz file in both DJI Pilot 2 and MSDK V5 app, your kmz file must contain both template.kml and waylines.wpml files.

     

    I understood this to mean that for MSDKV5 applications, only the waylines.wpml was necessary - template.kml would only be required if the same kmz file was expected to be opened with DJI Pilot 2. However, we have succeeded in uploading the kmz from our Android/data section by placing a template.kml file in the kmz. Is it correct to assume that the drone firmware will otherwise ignore the template.kml file?

    0
    Comment actions Permalink
  • DJI Developer Support
    The firmware still needs to check the existance of template.kml. So for MSDK app you can only write an empty template.kml file. Please read this article, https://sdk-forum.dji.net/hc/en-us/articles/12560010128153-How-to-write-an-empty-template-kml-file-
    1
    Comment actions Permalink
  • Alexis Glass

    I missed that article - thank you. I think it would be helpful to clarify the  FAQ on this point.

    0
    Comment actions Permalink

Please sign in to leave a comment.