DanZap
DanZap

Reputation: 33

Show outbound texts using SMSManager in the default android text application

I'm currently writing an application that uses the users voice to send out text messages, I am using the SMSManager to send texts and it works. The issue I am having is when I go to the text messaging application to view my text history I don't see my sent texts. Is there a way for my sent texts from the SMSManager to appear in my text history?

Thanks!

Upvotes: 2

Views: 516

Answers (1)

sinisha
sinisha

Reputation: 1013

After sending use this code

Context context; //you should initialize it somewhere
...
ContentValues values = new ContentValues();
values.put("address", number);
values.put("body", message );
values.put("date", time );
context.getContentResolver().insert(Uri.parse("content://sms/sent"), values);

But this is unofficial

Upvotes: 2

Related Questions