cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Re: Dropbox should respond to Android Intent.ACTION_SEND

Dropbox should respond to Android Intent.ACTION_SEND

Craig M.21
New member | Level 2

My android app uses the code below to allow users to back up an important file. A number of applications, including Google Drive, appear as suitable services to handle the file, but Dropbox does not appear, even though it offers the same functionality as Google Drive. Could you please change Dropbox so that it appears and my users can access it in this way?

File F = new File(sdPath);

if(F.exists()){  

    Uri U = Uri.fromFile(F);
    Intent i = new Intent(Intent.ACTION_SEND);
    i.setType("file/*");
    i.putExtra(Intent.EXTRA_STREAM, U);
    startActivity(Intent.createChooser(i,"Email/Upload '" + filename + "'"));
}  


15 Replies 15

Adrien B.1
Helpful | Level 6

That was a little pain, but I found a temporary workaround.
It looks like the last update broke a little bit of its Intent parsing.

If you want a Dropbox share to work (currently 2016/05/09), you'll have to remove the EXTRA_TEXT from your Intent.

The following exemple works, but it ruins the mail share :
Uncomment the line to see the Dropbox app bad behaviour.

Intent intentShareFile = new Intent(Intent.ACTION_SEND);
intentShareFile.setType("application/pdf");
intentShareFile.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(myFile));
intentShareFile.putExtra(Intent.EXTRA_SUBJECT, "My subject");
// intentShareFile.putExtra(Intent.EXTRA_TEXT, "My text");
startActivity(Intent.createChooser(intentShareFile, "Choose"));

It seems that a few apps sadly choosed to remove this Extra to make Dropbox works.
This thread is still relevant : Dropbox should properly parse and propery respond to an Intent.SHARE.

AntonioC
Dropbox Staff

Hi everyone, we've landed a fix for this that should be out in early June. Thank you for your patience!

Gil G.
New member | Level 1

Is the fix out yet? We are sharing image/png together with an extra text that contains a link to our app. I'd expect Dropbox to ignore the text and upload the image..

AntonioC
Dropbox Staff

Hi Gil, this issue has been resolved on our 10.2 release which should be out to the Play Store by next week.

Jonathan M.32
New member | Level 1

Hey, same deal here with our app FlipaClip on Android. I'm not sure who is here DropBox dev but I assume Antonio? If that's the case version 10.2? I see on GooglePlay 8.2.4.

We are using:

public static void share (Context context, String subject, String message, String title, Uri data, String mime)
{
Intent intent = new Intent();
intent.setAction(Intent.ACTION_SEND);

// Add data to the intent, the receiving app will decide what to do with it.
if (null != subject)
{
intent.putExtra(Intent.EXTRA_SUBJECT, subject);
}

if (null != message)
{
intent.putExtra(Intent.EXTRA_TEXT, message);
}

intent.putExtra(Intent.EXTRA_TITLE, title);
intent.setType(mime);
intent.putExtra(Intent.EXTRA_STREAM, data);

Intent newShareIntent = Intent.createChooser(intent, "Share with");
newShareIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(newShareIntent);
}

NATTSOE
New member | Level 2
image/*
Need more support?