Sms doesn't save on Kitkat 4.4 <Already set as default messaging app>

风格不统一 提交于 2019-11-27 15:57:06

The default SMS app is responsible for writing all incoming messages to the Provider. Even though you've implemented a Receiver for your app to read the message from the SMS_RECEIVED broadcast, you still need to actually write the message to the Provider. For example:

ContentValues values = new ContentValues();
values.put(Sms.ADDRESS, address);
values.put(Sms.BODY, smsBody);
context.getContentResolver().insert(Sms.CONTENT_URI, values);
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!