开发者

Android: Updating the sent box afer sending an sms

开发者 https://www.devze.com 2023-04-13 03:00 出处:网络
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.

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

精彩评论

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