Android: Updating the sent box afer sending an sms
My app sends an sms and I would like to update the phone sent box as if the sms was sent bu 开发者_JAVA技巧the user. How can this be done ?
You need to add this lines after smsManager.sendTextMessage(number, null,desc, sentPI, deliveredPI);
:
ContentValues values = new ContentValues();
values.put("address", number);
values.put("body", desc);
getApplicationContext().getContentResolver().insert(Uri.parse("content://sms/sent"), values);
精彩评论