[英]how to get google drive share link in android
For example:例如:
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
switch (item.getItemId()) {
case R.id.get_shared_resource:
startLink();
break;
default:
// ...
}
}
private void startLink() {
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse(https://drive.google.com/...));
startActivity(i);
}
This is not possible using the Google Drive APIs, which are DEPRECATED and will be completely shut down within a few months:使用已弃用的 Google Drive API 无法做到这一点,并将在几个月内完全关闭:
https://developers.google.com/drive/android/deprecation https://developers.google.com/drive/android/deprecation
December 6, 2019
The Drive Android API is shut down and all connection attempts will be refused. Clients must migrate by this date.
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.