cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Back again with another edition of 'How we use Dropbox', so find out how Emma uses to-do lists to get it all done 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: 

Android - Save file URL using file chooser

Android - Save file URL using file chooser

alexsajno
Explorer | Level 3

I used the File Chooser in Android Studio because it was difficult for me to do the login and use the download methods. I used file choosed with direct link ans after receiving the uri I converted it to URL and download the file. I want to keep some URL in shared preferences to download the file in the future without eneter the file chooser again. The problem is that the direct link expires in 4 hours and the preview link is not helpful in this case because I am downloading the file automatically and importing some data. So I don't want the preview stuff. Some idea?? I can try also the login and download method if there is a way to save the file location but there are some bugs in my code because of version V2. So I prefer the first way which worked for me.

1 Accepted Solution

Accepted Solutions

Re: Android - Save file URL using file chooser

Greg-DB
Dropboxer

If you need non-temporary links, but also need to download from them programmatically, you can use the "preview" links, but modify them as documented here:

https://www.dropbox.com/help/desktop-web/force-download

View solution in original post

5 Replies 5

Re: Android - Save file URL using file chooser

Greg-DB
Dropboxer

If you need non-temporary links, but also need to download from them programmatically, you can use the "preview" links, but modify them as documented here:

https://www.dropbox.com/help/desktop-web/force-download

View solution in original post

Re: Android - Save file URL using file chooser

alexsajno
Explorer | Level 3
But these link is permanent? It means I can use same link next month???

Re: Android - Save file URL using file chooser

Greg-DB
Dropboxer

The preview links don't expire on their own, though they can be revoked by the user. So, as long as the user doesn't disable the link, or delete the file, yes, you'd still be able to use them after an arbitrary amount of time.

Re: Android - Save file URL using file chooser

alexsajno
Explorer | Level 3
Okay but I am the user. I should creat a link for every file and then use the file chooser? or the link is created automatically by the app?

Re: Android - Save file URL using file chooser

Greg-DB
Dropboxer

When using the Dropbox Chooser, Dropbox will automatically create the link to the file when the user chooses the file. The user does not need to go to Dropbox to create the link themnselves first.

Poll
We love to learn from the educators who use Dropbox. Whether you teach kids, teens, adults or a combination of all three, we want to know what apps and integrations you use with Dropbox to help with teaching. Which of the ones below is your favorite, or most used tool?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropboxer
  • User avatar
    alexsajno Explorer | Level 3
What do Dropbox user levels mean?
Need more support?