Android Question Set sms recipient

imgsimonebiliato

Well-Known Member
Licensed User
Longtime User
Hi
I open the package "com.android.mms" with an Intent, but I need to open it, with also a recipient and a body message.
Is there a way?
 

imgsimonebiliato

Well-Known Member
Licensed User
Longtime User
With PhoneSms you can write any text you like.
I can't find a valid example..
But I need to set the recipient, not only the sms text. Please, can you help?
 
Last edited:
Upvote 0

imgsimonebiliato

Well-Known Member
Licensed User
Longtime User
B4X:
Dim ps As PhoneSms
ps.Send("123456778", "this is the text")

Ok we're almost there. But now, I need to open the SMS application with already set the number 123456789
 
Upvote 0

imgsimonebiliato

Well-Known Member
Licensed User
Longtime User
B4X:
Dim i As Intent
i.Initialize(i.ACTION_VIEW, "")
i.SetType("vnd.android-dir/mms-sms")
i.PutExtra("sms_body", "body")
i.PutExtra("address", "123456768")
StartActivity(i)

Yes! Perfect! Many thanks! :)
 
Upvote 0
Top