Private Sub btnViewImage_Click
Dim FileName As String = "b4a.png"
File.Copy(File.DirAssets, FileName, Provider.SharedFolder, FileName)
Dim in As Intent
in.Initialize(in.ACTION_VIEW, "")
Provider.SetFileUriAsIntentData(in, FileName)
'Type must be set after calling SetFileUriAsIntentData
in.SetType("image/*")
StartActivity(in)
End Sub
Private Sub btnShareFile_Click
Dim FileToSend As String = "Message.txt"
File.WriteString(Provider.SharedFolder, FileToSend, "jaklsdjalksdjalskdjasld")
Dim in As Intent
in.Initialize(in.ACTION_SEND, "")
in.SetType("text/plain")
in.PutExtra("android.intent.extra.STREAM", Provider.GetFileUri(FileToSend))
in.Flags = 1 'FLAG_GRANT_READ_URI_PERMISSION
StartActivity(in)
End Sub