MediaManager File Download Execution Errors
958 2 2022-9-22
Uploading and Loding Picture ...(0/1)
o(^-^)o
Steve Graf
lvl.2
United States
Offline

I'm trying to implement the ability to download the most recent video file from the SD card in the drone to my connected Android device. I'm using a DJI Mini SE, as it seems to support the file retrieval functions better than a Mini 2 currently.

I've recently gone through the steps outlined in this example tutorial:
https://developer.dji.com/mobile-sdk/documentation/android-tutorials/MediaManagerDemo.html

After bringing over the required functions from that tutorial to get a file list that contains the sorted files from the SD card (I am able to verify that the size of the file list corresponds to the amount of files on the SD card), the DownloadListener is returning the onFailure callback with an error message along the lines of "Execution failed to execute". The function from the example that returns this is downloadFileByIndex().I figured I had moved over something incorrectly, so I downloaded the example code base, connected my Mini SE, and unfortunately got into the same onFailure callback after selecting a file from the list to download.

Is it not possible to download a video file from the Mini SE to the device connected to the remote controller? I know the iOS Fly App is able to download videos from both the Mini SE and the Mini 2, but maybe the functionality hasn't made it's way into the Android Mobile SDK yet. Is there a list of drones that DO support this file download functionality somewhere?

Any help or guidance would be appreciated on this, thanks!
2022-9-22
Use props
Steve Graf
lvl.2
United States
Offline

An update on this:
It seems the issue is actually stemming from the device being downloaded to. The example app and the logic moved over to my personal app are both able to download a video file from the SD card on the Mini SE drone to my Samsung phone (SM-G960U) but NOT my Samsung tablet (SM-T733).

Has anyone else ran into issues like this? I've ensured that the permissions are being acquired on app start, so I'm not sure where the difference between the phone and the tablet is coming from at this point...

2022-9-23
Use props
Steve Graf
lvl.2
United States
Offline

Another, later update on this:
I narrowed down the issue further and found the difference between later Android versions and more recent Android versions. For older Android versions, the external storage management is a little more loose and you don't have to explicitly request MANAGE_EXTERNAL_STORAGE. In the DJI Media Manager example, the READ_EXTERNAL_STORAGE and WRITE_EXTERNAL_STORAGE were all that were required in older Android versions to successfully download a video from the Drone's SD card to the device (which is why I was able to download to my Samsung phone with Android 9). However, in more recent Android versions, you need to also request permission to MANAGE_EXTERNAL_STORAGE. I used the documentation found here to pull up the settings app on the user's device and prompt them with allowing the missing permission: https://developer.android.com/tr ... ge/manage-all-files

It's not the most convenient user experience, but once the user allows the external storage management permission you won't have to prompt them again. Hopefully DJI can address this in an eventual update to the Media Manager example application.

Side note:
Finally finding this missing permission also fixed an issue with downloading files from the Mini 2 (and you have to enter playback mode instead of setting the mode - refer to another forum post found here: https://sdk-forum.dji.net/hc/en- ... load-playback-mode-), if anyone is also experiencing issues with that.
2022-10-3
Use props
Advanced
You need to log in before you can reply Login | Register now

Credit Rules