我想从Google云端硬盘下载文件到我的手机。到目前为止,我可以从我的应用访问Google云端硬盘,但到目前为止,我只能从Google云端硬盘中选择一个文件,但我无法下载它。从手机上的Google云端硬盘应用中,我可以做到这一点,但我需要从我的应用中执行此操作。如何从Google Drive下载文件到我的手机?
public void openFolder() {
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
Uri uri = Uri.parse(Environment.getExternalStorageDirectory().getPath()
+ "/Android/data/com.google.android.apps.docs/files/");
intent.setDataAndType(uri, "text/mp3");
startActivity(Intent.createChooser(intent, "Open folder"));
}
通过此代码,我可以通过我的应用访问Google云端硬盘。 请帮忙吗?提前致谢。