cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
If you’ve changed your email address, now's the perfect time to update it on your Dropbox account and we’re here to help! Learn more 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: 

Cannot share a preview

Cannot share a preview

elodie
New member | Level 2

Hi Dropbox support team,

 

I would like to be able to share a document between the dropbox app and and my android app. My app supports the following intent filter:

 

<intent-filter>
<action android:name="android.intent.action.SEND"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:mimeType="application/pdf"/>
</intent-filter>

It works great when I export a file saved in dropbox to my app but it's broken when I share a document that is not saved in dropbox yet.

Steps to reproduce: 

    - open a doc from any email client using the dropbox preview

    - tap on the menu icon and tap on "Share to"

    -> the shared Uri doesn't allow me to read the file (I am using the ContentResolver)

 

 

The uri format passed between the apps is "file:///data/user/0/com.dropbox.android/global/external/docpreviews/XXXXX.pdf}".

 

 

I tried to shared this file with Inbox, Gmail, Slack... none of those apps are able to complete the action. 

 

Is there a way a can read the file?

Would it be possible to pass a Uri that can be resolved by the ContentResolver?

 

Thanks,

 

3 Replies 3

Greg-DB
Dropbox Staff
Unfortunately, the Dropbox Android app doesn't currently support content links, but I'll be sure to pass this along as a feature request.

elodie
New member | Level 2

Hi Greg,

 

Thanks for your quick answer.

 

It's true that supporting content links would solve my issue but I don't think it's the only problem.

 

When the document is saved in Dropbox I can read the file from the Uri passed by dropbox

(format is file:///storage/emulated/0/Android/data/com.dropbox.android/files/XXX ) even if it's not a content link.

 

But when I try to share a document that is not saved yet, the Uri passed by the dropbox app doesn't seem to exist. I get a FileNotFoundException.

 

Would it be possible to pass the Uri passed by the mail client as a temporary solution?

 

I don't see how the "share to" option in the dropbox preview screen is supposed to work otherwise. Does it work in some cases?

 

Greg-DB
Dropbox Staff
Thanks for elaborating. I'll have the team take a look to see if we can offer a solution.
Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    elodie New member | Level 2
What do Dropbox user levels mean?