Android Question Send Text via Intent Filer to a APP

scsjc

Well-Known Member
Licensed User
Longtime User
Hello,
im use a intent to send a plain text....

B4X:
        Dim i As Intent
        i.Initialize(i.ACTION_SEND,"")
        i.SetType("text/plain")
        i.PutExtra("android.intent.extra.TEXT", "Hello.......")
        i.WrapAsIntentChooser("Compartir con...")
        StartActivity(i)

is possible filter any app to send (facebook.... whatsapp.... ) ?
 

scsjc

Well-Known Member
Licensed User
Longtime User
i found that for whatsapp, and work

B4X:
Dim Intent1 As Intent
Intent1.Initialize(Intent1.ACTION_SEND ,"")
Intent1.SetType("text/plain")
Intent1.SetComponent("com.whatsapp/.ContactPicker")
Intent1.PutExtra("android.intent.extra.TEXT", TextToSend )
StartActivity(Intent1)
 
Upvote 0
Top