Android Question Selecting an application for viewing pdf files.

Sergey_New

Well-Known Member
Licensed User
Longtime User
I check which applications installed on the device can view pdf files:
B4X:
Sub openPdf
    Private in As Intent
    in.Initialize(in.ACTION_VIEW, "file://")
    in.SetType("application/pdf")
    Dim pm As PackageManager
    Log(pm.queryIntentActivities (in))
End Sub
Here's what's in Log:
B4X:
(ArrayList) [com.microsoft.skydrive/.pdfviewer.PdfIntentHandlerActivity,
com.dropbox.android/com.dropbox.preview.v3.ExternalPdfPreviewActivity,
com.google.android.apps.docs/com.google.android.apps.viewer.PdfViewerActivity,
com.microsoft.office.word/.WordActivity,
com.ncloudtech.cloudoffice/.NewIcons,
com.samsung.android.app.notes/com.samsung.android.support.senl.nt.app.trigger.PdfOnlyOpenTriggerActivity]
How, if possible, can I determine which application is installed for viewing permanently and can I programmatically cancel it?
 

DonManfred

Expert
Licensed User
Longtime User
can I determine which application is installed for viewing permanently and can I programmatically cancel it?
Not that i know of.
No.
 
Upvote 0

Sergey_New

Well-Known Member
Licensed User
Longtime User
I get the Package Name.
2.png

Next, you can go to the application settings.

There is some discrepancy between the Package Name and what the device shows when selecting the default application. It will not be easy for the user to figure it out.
1.png

I have attached an example. What can you advise?
 

Attachments

  • test.zip
    3.3 KB · Views: 107
Upvote 0
Top