I found a solution to this at this link : Download file from Dropbox and save it into SDCARD But I dont know what is FileDownload class here. And what is api object?
It is related to the dropbox core api.
Just look at the developer site from dropbox:
https://www.dropbox.com/developers/core
Related
I'm developing an Android app that lets users upload files from their Google Drive using Google Drive Android API. Instead of having users download the file to the device and then upload it to my server, I would like to generate a download link which the user can post to the server and have it download the file directly from the Google Drive API.
Is this possible in any way? The only way I can think of is having the user authenticate in both the app and through a browser window, but that is quite a hassle for something that seems like a pretty common use case.
I would like to generate a download link..and have it download the file directly from the Google Drive API.
This is certainly doable and I've tried it. Try this tutorial on Creating Direct Links From Drive. Just take note of your file type- doc, ppt, img ,etc. and the corresponding FILE ID.
For Google Docs files:
https://docs.google.com/document/d/FILE_ID/export?format=doc
https://docs.google.com/document/d/FILE_ID/export?format=pdf
For Google Presentations files:
https://docs.google.com/presentation/d/FILE_ID/export/pptx
https://docs.google.com/presentation/d/FILE_ID/export/pdf
For Google Spreadsheets files:
https://docs.google.com/spreadsheets/d/FILE_ID/edit?usp=sharing
Here's an SS of a direct download I got using the pptx format.
How to get the direct download link of a file by google drive api v3 in java ?
Hi all,
I've worked with Google Drive Api in Android for a week, I used both Android Drive SDK and Drive Rest Api for java but I can't find the way how to how to get the direct download link of a file (anyone can read) on Drive.
I've try How to get the url of a file of google drive to download in android but it's not work.
Please help me.
Thanks.
Given that you have the actual FILE-ID for the file , you can download it using the download link
drive.google.com/uc?id=FILE-ID&export=download
If you want to have the direct download link of a file, DriveFile doesn't seem to be what you're looking for. What you can do is to use the Drive API web service instead. Note that you're still required to be authenticated for you to use the API.
Check out the Download Files section of the documentation, there are 3 ways for you to download the file.
Download a file — files.get with alt=media file resource
Download and export a Google Doc — files.export
Link a user to a file — webContentLink from the file resource
Another alternative is for you to use the webContentLink for you to download the file. However, this is only available for files with binary content in Drive.
I would like to upload file into google drive from android app.I got the example from this link for uploading a photo into Google Drive from camera.I didn't get any better solution for uploading a file(.txt,.pdf,.doc).so anyone please suggest a needful information to me.
The android-demos is a more complete reference application that demonstrates file creation, etc.
I am new to this forum so please forgive me if I am asking something stupid.
I have a mobile responsive website which is to be ported on mobile devices using PhoneGap. The code of mobile site is on github and I want to download the code from github in order to work in offline mode. This would help in keeping just one version of application on play store which will download content from github if there are any changes on website.
So, is there anyway I can download zip file from github using android APIs?
Thanks for reading.
Regards,
Anjali
This is very much possible. Please see at the link below.
How to download source in ZIP format from GitHub?
You need to use HttpURLConnection in order to download it to the location you want.
Cheers,
Bsengar
The link for the actual zip file is available on GitHub.
It's possible to download a zip file using the HttpURLConnection. You should cache the zip(on SD card for example), and extract it. The code for downloading the zip is shown in this thread:
Android Download Zip to SD card?
I can find lots of tutorials and examples on how to upload a file from sdcard to dropbox account. But how can I upload a file that is not in sdcard and all I have is url? I don't want to download it and then upload it, because file is like 400MB size.
Save Web Files (http://ctrlq.org/save/) can do it. (just visit the website on your android)
Dropbox has implemented this as a native API call: https://blogs.dropbox.com/developers/2015/06/programmatically-saving-a-url-to-dropbox/
This is currently being re-implemented by DBinbox.com to be more user-friendly :)