Android Question getSize or size ?


Licensed User
I found bellow post for sending sms message.
I part which Erel suggested when using bellow line (original from his post) I'm getting error that getSize not exists.
Dim size As Int = parts.RunMethod("getSize", Null)

But when I replace getSize with size then everything works okay
Dim size As Int = parts.RunMethod("size", Null)

Question is:
Should be getSize or size?

Sub SendLargeSms(Destination As String, Message As String)
    Dim ctxt As JavaObject
    Dim smsManager As JavaObject
    smsManager = smsManager.InitializeStatic("android.telephony.SmsManager").RunMethod("getDefault", Null)
    Dim parts As JavaObject = smsManager.RunMethod("divideMessage", Array(Message))
    Dim i As Intent
    i.Initialize("b4a.smssent", "")
    Dim pi As JavaObject
    pi = pi.InitializeStatic("").RunMethod("getBroadcast", Array(ctxt, 0, i, 134217728))
    'Dim size As Int = parts.RunMethod("getSize", Null)
    Dim size As Int = parts.RunMethod("size", Null)
    Dim al As JavaObject
    al.InitializeNewInstance("java.util.ArrayList", Null)
    For ii = 0 To size - 2
        al.RunMethod("add", Array(Null))
    al.RunMethod("add", Array(pi))
    smsManager.RunMethod("sendMultipartTextMessage", Array(Destination, Null, parts, al, Null))
End Sub

Old post location