开发者

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);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜