Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download Button not working #15

Open
irwinsantoso opened this issue May 2, 2021 · 6 comments
Open

Download Button not working #15

irwinsantoso opened this issue May 2, 2021 · 6 comments

Comments

@irwinsantoso
Copy link

I have a problem after selecting a media, and I clicked the download button an error toast appeared :

Download file failed The execution cannot be executed

How can I debug the issue ?

Drone : DJI Mavic 2 Pro
DJI SDK Version : 4.14.1
Android Version : Android 11

Screenshot (48)

@dji-dev
Copy link

dji-dev commented May 3, 2021

Agent comment from cheney.zeng in Zendesk ticket #47223:

Hi Developer,

Thank you for reach out to DJI Developer Support. Due to a Chinese Holiday there maybe a short delay in responding directly to your question - we apologize for any inconvenience this may cause you and look forward to addressing your ticket as soon as possible.

Warm Regards,
DJI Developer Support

°°°

@dji-dev
Copy link

dji-dev commented May 4, 2021

Agent comment from William Wong in Zendesk ticket #47223:

Dear Client
Thank you for contacting DJI.

You need to check if you are using SD card. If you are using internal storage to store photos. You need to change the refreshFileListOfStorageLocation and getSDCardFileListSnapshot fucnctions.

Hopefully our solution can help you.
Kindly Regards,
DJI Developer Support

°°°

@irwinsantoso
Copy link
Author

Thank you for the response, I have confirmed the use of SD card, and the thumbnail of the files appeared, but the download failed.

Is there a way to check where it went wrong ?
I checked the error code is 255

@dji-dev
Copy link

dji-dev commented May 7, 2021

Agent comment from William Wong in Zendesk ticket #47223:

Dear Client
Thank you for contacting DJI.

  1. Try reload and download again.
  2. Check if your aircraft firmware is up to date.
  3. Check if the fetch file data function's destDir which is File destDir = new File(Environment.getExternalStorageDirectory().getPath() + "/MediaManagerDemo/"); exist or not.

Hopefully our solution can help you.
Kindly Regards,
DJI Developer Support

°°°

@jeryini
Copy link

jeryini commented Nov 27, 2021

Had exactly the same issue and it was due to point 3, I also suggest to instead define your destDir like the following:

private File destDir = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM), "YourAppName");

@grofattila
Copy link

It turned out that if the directory/subdirectory does not exist, the method call will fail.

If you pre-create the chosen folder, the download button works as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants