Hi,
The code below to send SMS works very well on most smartphones but on some numbers such as Honor 10 from Huawei it crashes the application.
Should I use another code or modify this one?
Thank you
B4X:
Sub ImgSms_Click
MessageURI= "Ceci est un exemple "
Dim i As Intent
i.Initialize(i.ACTION_VIEW,"")
i.SetType("vnd.android-dir/mms-sms")
i.PutExtra("address", ""))
i.PutExtra("sms_body", MessageURI)
StartActivity(i)
End Sub
Dim In As Intent
In.Initialize(In.ACTION_VIEW, "sms:" & number) 'better to URLEncode the number with StringUtils,
In.PutExtra("sms_body", "this is the body")
StartActivity(In)