Android Question sendMultimediaMessage

MarcoRome

Expert
Licensed User
Longtime User
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:

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
 

MarcoRome

Expert
Licensed User
Longtime User
I read in unfiltered:

Seem that error is here:
Caused by: java.net.MalformedURLException: no protocol: +3933433670XX
 
Last edited:
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
The error seems to be

 
Last edited:
Upvote 0

udg

Expert
Licensed User
Longtime User
I will wait your MMS
.. and some late night phone calls, if that's your real phone number..eheh
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…