Activity starter task

Pdf link how to redirect in Google drive…
I want to open pdf link directly in Google drive

You cannot force the use of Google Drive, if I’m not mistaken.

However, with:

Action: android.intent.action.VIEW
Data Uri: [link.pdf]

You should be able to view the PDF. The browser will either open the PDF internally or redirect to another PDF handler such as Google Drive. :slight_smile:

No no this code asking open with browser or drive but I want to open only drive .
When click then direct open in drive .
Is this possible??

It will directly open in Drive only if you set Drive’s Open supported links property to Open in this app in your phone’s settings. By default it is set to Ask every time.

Can I set default set in my app?
When click from my app open only drive?

As far as I know, no you cannot. That would be taking away the user’s freedom. :sweat_smile:

Ok , thank you :lying_face:

1 Like

pdf file viewing from google drive by activity starter how is the complete blocks? can you showing me please…

Set action as stated. Set the data URI to the PDF link. Start Activity.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.