Hi All.
I'm trying to send an MMS with the sendMultimediaMessage method. But it does not work.
with this method is possible send MMS without Intent ( API level 21 )
The code seems correct:
Documentation HERE
Any idea ?
Thank you
I'm trying to send an MMS with the sendMultimediaMessage method. But it does not work.
with this method is possible send MMS without Intent ( API level 21 )
The code seems correct:
B4X:
Sub SendMMS(PhoneNumber As String, dir As String, Filename As String)
Dim ctxt As JavaObject
ctxt.InitializeContext
Dim sm As JavaObject
sm = sm.InitializeStatic("android.telephony.SmsManager").RunMethod("getDefault", Null)
'Dim uri1 As Object = CreateUri("file://" & File.Combine(dir, Filename))
Dim uri1 As Object = CreateUri("file://" & File.Combine(File.DirRootExternal, "foto3.jpg"))
Try
Log("Sended..")
sm.RunMethod("sendMultimediaMessage", Array(ctxt, uri1, PhoneNumber, Null, Null))
Catch
Log(LastException)
End Try
End Sub
Documentation HERE
Any idea ?
Thank you