Sub SendChooser(strPath As String, strFile As String)
uriX.Parse("file://" & File.Combine(strPath, strFile))
Dim mapSkipForList As Map
mapSkipForList.Initialize
mapSkipForList.Put("com.google.android.apps.maps", True) ' Example
' Comment the next line out to proof that your app can be skipped or not
mapSkipForList.Put(Application.PackageName, True) ' <<--- <<--- <<--- This is your own package name
'
Dim strPackageName As String = ""
Dim pm As PackageManager
Dim Intent1 As Intent
Intent1.Initialize(Intent1.ACTION_SEND, "file://")
Intent1.SetType("image/*")
'
Log(" ")
For Each cn As String In pm.QueryIntentActivities(Intent1)
strPackageName = cn.SubString2(0, cn.IndexOf("/"))
If mapSkipForList.ContainsKey(strPackageName) Then
Log(" >> Skipped strPackageName=" & strPackageName)
Else
Log("Used strPackageName=" & strPackageName)
Dim bdw As BitmapDrawable = pm.GetApplicationIcon(strPackageName)
lv.AddTwoLinesAndBitmap2(pm.GetApplicationLabel(strPackageName), "", bdw.Bitmap, cn )
End If
Next
Log(" ")
End Sub
Sub LvChooser_ItemClick (Position As Int, Value As Object)
Log($"LvChooser_ItemClick, Position=${Position}, Value=${Value}"$)
Dim Intent1 As Intent
Intent1.Initialize(Intent1.ACTION_SEND , "file://")
Intent1.SetComponent(Value)
Intent1.SetType("image/*")
Intent1.PutExtra("android.intent.extra.STREAM", uriX) ' <<-- "uriX" contains the path yout setup to your file with uriX.Parse(...)
StartActivity(Intent1)