[英]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 me in downloading mp3 files from google drive 我正在使用Android应用程序,在该应用程序中我必须从Google驱动器下载音频文件,然后将这些文件保存在SD卡中。是否有任何api或示例项目可以帮助我从Google驱动器下载mp3文件
OR Is there any other way to to download mp3 file from google drive programatically... 或者是否有其他方法可以通过编程方式从Google驱动器下载mp3文件...
Can we use public downloadable url for achieving above mentioned purpose 我们可以使用公共可下载网址来实现上述目的吗
Thanks 谢谢
There are two a APIs that that allow you to do it. 有两个API可以帮助您做到这一点。 The GDAA and the REST .
GDAA和REST 。 None of them deals with the mp3 files specifically, though.
不过,它们都没有专门处理mp3文件。 The APIs deal with a binary file content only.
这些API仅处理二进制文件内容。 That means you:
这意味着您:
If you insist on applying the URL based Id, it is easier to use the REST, since: 如果您坚持应用基于URL的ID,则使用REST更容易,因为:
Also, you may use the demo code here to see the (dis)advantages of using one API or another. 另外,您可以在此处使用演示代码来查看使用一个或另一个API的(缺点)优势。 It deals with jpg content instead of mp3, but it has all the building blocks you need.
它处理的是jpg内容而不是mp3,但是它具有您需要的所有构造块。 Be sure you understand the relation of DriveId and ResourceId.
确保您了解DriveId和ResourceId的关系 。
Good Luck 祝好运
Go to Developers Google Website click here 转到开发者Google网站,点击此处
you will get information how to download file. 您将获得有关如何下载文件的信息。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.