-1

I am working on an app which use Google Drive. I want to get the public share link.

Share Option

Get share link

piet.t
  • 11,718
  • 21
  • 43
  • 52

2 Answers2

0

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

This is not possible using the Google Drive APIs, which are DEPRECATED and will be completely shut down within a few months:

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. 
Taimoor Ahmad
  • 530
  • 5
  • 11