cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
We've been busy working on some major updates to the Community, so check out what's changing, what’s staying the same and what you can expect from the Dropbox Community right 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: 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?