Want to open pdf file in Google drive

I want to open pdf in Google drive.
Right now I am using this block

And getting result like this

use Do it to debug your blocks, see also tip 4 here App Inventor: How to Learn | Pura Vida Apps
see also Live Development, Testing, and Debugging Tools

see also App Inventor Code Snippets | Pura Vida Apps


1 Like

Using do it gives Unbound variables result

Right now my pdf is getting opened but it asks which app u want to open pdf

  1. drive pdf
  2. Adobe reader
    I want it directly gets open in Google drive without asking how to open

Then do not use activity starter

Set Activity starter.Package = com.google.android.apps.docs

Set Activity starter.class = com.google.android.apps.viewer.PdfViewerActivity

But it gives error when Google drive didn’t install in the device but in rare case because mostly android apps have Google drive installed.

It works only with downloaded pdf uri

You could simply set webviewer’s url to

1 Like

use the resolve activity method before starting the activity
an example see here App Inventor Code Snippets | Pura Vida Apps

also for Do it and local variables: you might want to display them in a label to find out whats going on…