Intent for Drive PDF Viewer - How to open PDF in Google Drive with intent

We can open PDF in google drive by below code

Uri pdfUri = Uri.parse("pass you file path");             
Intent shareIntent = ShareCompat.IntentBuilder.from(this)
                                     .setText("Share PDF doc")
                                         .setType("application/pdf")
                                         .setStream(pdfUri )
                                         .getIntent()
                                 .setPackage("com.google.android.apps.docs");
startActivity(shareIntent);

 


Flutter Questions

Android Questions

Python Questions

Java Questions