Is there any way we can save it to the phone's sent folder? There should be a way as even if we use, Handcent or any third party messaging client, the sent messages are stored in the phone's native sent folder.That is correct.
Sorry Erel, I think I didn't clearly explain myself. I am talking about messaging application. When you send a text message to a recipient it gets saved. It doesn't matter which messaging application you use (like native messaging app, Handcent or Gosms) all of them can see the 'sent' and 'received' messages. If you send a message using Handcent app, you can see that message using Android Native Messaging client. Is there a way to save a sent message by using 'PhoneSms'.I'm not familiar with such a folder. Where is it located?
Sub AddSentSms(Address As String, Body As String)
Dim r As Reflector
Dim values As Object
values = r.CreateObject("android.content.ContentValues")
r.Target = values
Dim s As String
s = "java.lang.String"
r.RunMethod4("put", Array As Object("type", 2), Array As String(s, "java.lang.Integer"))
r.RunMethod3("put", "address", s, Address, s)
r.RunMethod3("put", "body", s, Body, s)
r.Target = r.GetContext
r.Target = r.RunMethod("getContentResolver")
r.RunMethod4("insert", _
Array As Object(r.RunStaticMethod("android.net.Uri", "parse", _
Array As Object("content://sms/sent"), Array As String(s)), values), _
Array As String("android.net.Uri", "android.content.ContentValues"))
End Sub
AddPermission("android.permission.WRITE_SMS")
AddPermission("android.permission.READ_SMS")