Open Drive app to create file and get link back - android

I want to use google drive app on android to scan some documents, create file and then get the link. I know there's a google api which I can use but then I would have to implement my own document scanner.

For the scanning of documents, try checking out Google Drive's own OCR feature, though it might be pretty limited. As for the creation of files, you can use Google Drive API's DriveResourceClient.createFile() method.
When you call DriveResourceClient.createFile(), the Drive for Android API places the new file in the folder that you passed in as an argument.
After creating the file, you can get the file's webViewLink property for the link. webViewLink is a link for opening the file in a relevant Google editor or viewer in a browser.

Related

Can I use Google drive as database for my Android app

I'm new to Mobile development and I'm trying to create a PDF Android app (to launch it in playstore) and I have a lot of PDF files that I will use and they are stored in my Google drive so my question is can I use Google drive as my database, is it possible when there are a lot of users or there could be problems and is there other solutions.
I managed to create a simple version where it works fine but I'm the only user (I installed it directly from Android studio to my phone) but I have no idea if it will work when I launch it on playstore.
i am not expert of google drive but I have check that google drive let's create direct download link if you want to use google drive as just pdf storage then you can upload pdfs and generate direct download link from that uploaded document and then save it to any database then you can download that files with that link

Have server download file from users Google Drive

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

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.

How to upload files to HTML5 Web App from Google Drive or Onedrive?

I am designing an web application that will allow applying for the jobs we post in our career page. The application will use responsive design and should make it easy for mobile users (iOS and Android initially) to upload their resumes. I read something about uploading files to Google Drive or MS Onedrive using their corresponding APIs. However, I am trying to do the opposite; browse files, select a resume, perhaps download it locally, and finally upload it to my web application.
Do you know if this is possible? If so, what would be your recommendation?
Thanks in advance!
First you can ask the user to authorize to use their Google Drive Data using OAuth2.0. The below two reference links from the Google Drive API will be useful
1.Get the list of filenames using the filelist option in the api and fetch the filename from the list https://developers.google.com/drive/v2/reference/files
2. Download the file directly to your server using the Downloads feature of the API
https://developers.google.com/drive/web/manage-downloads
I hope this gives you enough direction to proceed further.

Open/Read Document Drive API

i'm currently making an app that can read and possibly edit document file via android. the files.list API is already work, so i can read drive content from any google account. the question is how to open all those file?
is there any API to read the file content, or should i download the file first and then open it with corresponding app in my phone? which way better actually?
Yes, you can use the API to download the file. See the examples for the files.get method.

Categories

Resources