Thank you, NJ.
I am very appreciative of your contributions and generosity.
Your solution works (but I did not expect anything else). As usual, you hit the mark.
PROLOGUE
I am a little confused (maybe a lot). First, I do not have Google Docs installed in the tablet in which I tested your solution (I have Sheets and Drive). To double verify, I went to Google Play and found the Google Docs app and is asking me to Install (if I had it installed, it would ask me to Open).
Using the fantastic app, Phone Info by UncleDroid
,
Drive (Google Drive)
com.google.android.apps.docs
Google Docs (I installed it AFTER I ran the code you provided) is
com.google.android.apps.docs.editors.docs
Google Sheets is
com.google.android.apps.docs.editors.sheets
There is an older? Google PDF Viewer:
com.google.android.apps.PdfViewer which has a partial copyright by PDFium.
The PDF Viewer app that comes from the intent you suggested is not the one from PDFium (although both apps are identical except the menu which shows About in the PDFium version).
I could not find com.google.android.apps.docs.editors.PDFViewer?
So, is this PDFViewer part of Google Drive? I had found this
code in Stack Overflow (java continues to be coffee to me):
import android.support.v4.app.ShareCompat;
Uri pdfUri = Uri.parse("file://sdcard/sdcard0/test.pdf");
Intent shareIntent = ShareCompat.IntentBuilder.from(this)
.setText("Share PDF doc")
.setType("application/pdf")
.setStream(pdfUri )
.getIntent()
.setPackage("com.google.android.apps.docs");
startActivity(shareIntent);
Best regards.
Sandy