简体   繁体   English

如何在android中获取谷歌驱动器共享链接

[英]how to get google drive share link in android

I am working on an app which use Google Drive.我正在开发一个使用 Google Drive 的应用程序。 I want to get the public share link.我想获得公开分享链接。

股票期权

获取分享链接

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM