Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
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,
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?
Hi there!
If you need more help you can view your support options (expected response time for a ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!