Sub show_click
Dim i As Intent
i.Initialize(i.ACTION_VIEW, CreateFileProviderUri(File.DirDefaultExternal, "PP_" & MyTime & ".pdf"))
i.SetComponent("android/com.android.internal.app.ResolverActivity")
i.SetType("application/pdf")
i.Flags = 1
StartActivity(i)
End Sub
Sub CreateFileProviderUri (Dir As String, FileName As String) As Object
Dim FileProvider As JavaObject
Dim context As JavaObject
context.InitializeContext
FileProvider.InitializeStatic("android.support.v4.content.FileProvider")
Dim f As JavaObject
f.InitializeNewInstance("java.io.File", Array(Dir, FileName))
Return FileProvider.RunMethod("getUriForFile", Array(context, Application.PackageName & ".provider", f))
End Sub