我无法将Google docs file
链接传递给android上的Google Drive App
。
是否可以通过传递意图链接在Google云端硬盘Android应用上打开Google云端硬盘文件?
Private void open(){
String link = "https://docs.google.com/file/d/"+FILE_ID;
Uri path = Uri.parse(link);
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(path, MIME_TYPE);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
try {
startActivity(intent);
} catch (Exception e) {
showMessage(e.getMessage());
}
}