我是 Android 开发的新手。我需要你的一些澄清。我的问题是“是否有可能以编程方式在起草器中存储 no.of 短信?”。 请帮助我。
谢谢, Sekhar Bethalam。
最佳答案
是的,您可以将消息保存为草稿,执行此操作的代码如下:
//Store the message in the draft folder so that it shows in Messaging apps.
ContentValues values = new ContentValues();
// Message address.
values.put("address", address);
// Message body.
values.put("body", messagebody);
// Date of the draft message.
values.put("date", String.valueOf(System.currentTimeMillis()));
values.put("type", "3");
// Put the actual thread id here. 0 if there is no thread yet.
values.put("thread_id", "0");
getContentResolver().insert(Uri.parse("content://sms/draft"), values);
编码愉快!
关于android - 是否可以使用 Android sdk 将短信保存在草稿中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4592966/