How To Download Mp3 File From Google Drive In Android
I am working on Android application in which i have to download audio files from google drive and then save these files in sd-card.. Is there any api or sample project that helps m
Solution 1:
There are two a APIs that that allow you to do it. The GDAA and the REST. None of them deals with the mp3 files specifically, though. The APIs deal with a binary file content only. That means you:
- Find the file first. Either you know the name, mime type,... or you know it's Id. If you use REST, the Id can be extracted from the file's URL.
- Download the content as a binary stream.
- Save the content as an mp3 file on Android.
If you insist on applying the URL based Id, it is easier to use the REST, since:
- the URL directly corresponds with the REST Id (aka ResourceId in GDAA)
- you can use the REST playground (bottom) to test things interactively
Also, you may use the demo code here to see the (dis)advantages of using one API or another. It deals with jpg content instead of mp3, but it has all the building blocks you need. Be sure you understand the relation of DriveId and ResourceId.
Good Luck
Solution 2:
Go to Developers Google Website click here
you will get information how to download file.
Post a Comment for "How To Download Mp3 File From Google Drive In Android"