Your workflow is unique 👨💻 - tell us how you use Dropbox here.
Forum Discussion
ori
8 years agoExplorer | Level 3
FileUriExposedException
Hi Dropbox crashes. (dump is at the end of this question) I have an app that I had developed for myself. It used to work with Dropbox untill recently. I am storing my myfile.or1 on drop...
ori
8 years agoExplorer | Level 3
I found out that it happens with every app!
And every file.
If I try to open a file.txt from Dropbox -
Dropbox offers me a list of apps that can open .txt file.
7 out of 9 caus Dropbox to through FileUriExposedException
Mark
Super User II
8 years agoI'm moving this to API forum as you'll need to fix the issue in your app for it to work.
- burnitall8 years agoExplorer | Level 3
Hi, this is not an issue with our apps. Dropbox crashes before Android even asks for which app to send it to. You can see that from ori's stack trace. It does not contain any symbol other than Android and Dropbox.
The issue is that Dropbox tries to export a Uri with a "file" scheme. If you look at the documentation for FileUriExposedException, it explains that for apps targeting N, that exception is thrown, and the app needs to be changed to export a "content" scheme. The app exporting the Uri is Dropbox. Dropbox needs to be fixed.
- ori8 years agoExplorer | Level 3
Hi
I appology in advance, this is my first Android app.
So it may be the case that I am 180 degrees of track.I found a DropBox suggested implementation for a file chooser
But I ended up working around this issue:On my phone - in DropBox - I set my folder to be 'available offline'
This reults a loacl copy of my folder on my phone at:
/sdcard/Android/data/com.dropbox.android/files/u7778889/scratch/my-folderI then use ES File Exploer to accsess my local files
with an intent-filter for files not content.DropBox has a file chooser that I can integreate into my app:
https://www.dropbox.com/developers/documentation/java
The example works but I never integrated it with my app.- Greg-DB8 years ago
Dropbox Community Moderator
Thanks for the reports! I'll send this over to the right people here to look into it.
- MichaelRu8 years agoNew member | Level 2
burnitall explained very good why the problem happens. In this blog post you can find how to fix it: https://medium.com/@ali.muzaffar/what-is-android-os-fileuriexposedexception-and-what-you-can-do-about-it-70b9eb17c6d0
This has to be fixed in Dropbox and not in the target apps.
About Dropbox API Support and Feedback
Get help with the Dropbox API from fellow developers and experts.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
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!