【问题标题】:how to get google drive share link in android如何在android中获取谷歌驱动器共享链接
【发布时间】:2019-07-11 12:15:23
【问题描述】:

我正在开发一个使用 Google 云端硬盘的应用。我想获取公开分享链接。

【问题讨论】:

  • 首先请让我们知道您到现在为止做了什么?....我认为使用 android API for google drive 是不可能的。谢谢
  • 你想用 google-drive 链接做什么?

标签: android android-studio google-drive-api google-drive-android-api


【解决方案1】:

例如:

    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);
    }

【讨论】:

    【解决方案2】:

    使用已弃用且将在几个月内完全关闭的 Google Drive API 无法做到这一点:

    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. 
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多