B4A通过意图将照片和文字发送到电报

时间:2017-10-04 12:18:13

标签: android telegram

我已经阅读了一些例子,但我无法使用b4a

Dim share As Intent
share.Initialize(share.ACTION_SEND,"")
share.SetType("image/text/plain")
share.PutExtra("android.intent.extra.TEXT","myText")
share.PutExtra("android.intent.extra.STREAM",ParseUri(File.Combine(File.DirRootExternal, "Test.png")))
share.WrapAsIntentChooser("Share")

1 个答案:

答案 0 :(得分:0)

您应该包含SetPackage:

   Dim jo As JavaObject = share
   jo.RunMethod("setPackage", Array("org.telegram.messenger"))