问题
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!
回答1:
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
来源:https://stackoverflow.com/questions/13706526/show-outbound-texts-using-smsmanager-in-the-default-android-text-application