Sub ShareThreads(txt As String)
#if B4a
Dim i As Intent
i.Initialize(i.ACTION_SEND, "")
i.PutExtra("android.intent.extra.TEXT", txt)
i.SetType("text/plain")
i.SetPackage("com.instagram.barcelona")
Try
StartActivity(i)
Catch
MsgboxAsync("There was a problem starting Threads.","error")
End Try
#else if B4I
Private s As String
Private su As StringUtils
s = "barcelona://post/?text="&su.EncodeUrl(txt,"UTF8")
If (Main.App.CanOpenURL(s)) Then
Main.App.OpenURL(s)
Else
Msgbox("Could not start Threads","error")
End If
#End If
End Sub