Android Question Starting activity with intent

Big JR

Member
Licensed User
Longtime User
I'm trying to launch the stock sms/mms app from within my app and have the code below:

Sub SendMessage(PhoneNumber As String, Message As String, Dir As String, Filename As String)
Dim iIntent As Intent
iIntent.Initialize("android.intent.action.SEND", "")
iIntent.setComponent("com.android.mms.ui.ComposeMessageActivity")
iIntent.setType("vnd.android-dir/mms-sms")
iIntent.PutExtra("android.intent.extra.STREAM", CreateUri("file://" & File.Combine(Dir, Filename)))
iIntent.PutExtra("sms_body", Message)
iIntent.PutExtra("address", PhoneNumber)
iIntent.SetType("video/3gp")

StartActivity(iIntent)
End sub

But it always gives the 'Complete action using' dialog with all the apps that can handle the intent listed. I want it to go direct to the messaging app without the need for the dialog. I can't use PhoneSms because I'm attaching a file and need to send it as mms.

Why isn't the stock sms/mms app launching directly?
 
Top