I saw and example here and there for intents, but I noticed it takes a bit of guesswork to figure out what strings to pass sometimes so i'm starting a list of known intents. If you know any different ones please add them. pdf was obvious, however excel was not.
Filename syntax: file://SomeFolder/Filename.xxx
These are untested, but I've seen them around:
Filename syntax: file://SomeFolder/Filename.xxx
Sub OpenPDF(FileName As String)
Dim i As Intent 'Requires a reference to the Phone library
i.Initialize(i.ACTION_VIEW, FileName)
i.SetType("application/pdf")
i.WrapAsIntentChooser("Choose PDF Viewer")
StartActivity(i)
End Sub
Sub OpenExcel(FileName As String)
Dim i As Intent 'Requires a reference to the Phone library
i.Initialize(i.ACTION_VIEW, FileName)
i.SetType("application/vnd.ms-excel")
i.WrapAsIntentChooser("Choose Excel Viewer")
StartActivity(i)
End Sub
These are untested, but I've seen them around:
image/*
video/*
audio/*
application/pdf
application/postscript
application/zip
application/x-tar
application/msword
application/vnd.ms-excel
application/vnd.ms-powerpoint
application/vnd.oasis.opendocument.text
application/vnd.oasis.opendocument.presentation
application/vnd.oasis.opendocument.graphics
application/vnd.oasis.opendocument.image
application/vnd.oasis.opendocument.spreadsheet
application/vnd.openxmlformats-officedocument.wordprocessingml.document
application/vnd.visio
application/x-debian-package
application/vnd.android.package-archive
text/csv
text/plain
text/rtf