- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
android删除短信的处理(Android delete SMS processing)
android删除短信的处理(Android delete SMS processing)
1, get you want to delete the message thread ID (because of a short message, I want to delete received recently so I just need to reverse, according to the time and then get the first message thread ID on the line)
Private, long, getThreadId () {
Long threadId = 0;
String SMS_READ_COLUMN = read;
String WHERE_CONDITION = SMS_READ_COLUMN + = = 0;
String SORT_ORDER = date DESC;
Int count = 0;
Cursor cursor = mContext.getContentResolver ().Query
Uri.parse (content://sms/inbox),
New, String[], {_id, thread_id, address, person, date, body},
WHERE_CONDITION,
Null,
SORT_ORDER);
If (cursor = = null) {
{try
Count = cursor.getCount ();
If (count 0) {
Cursor.moveToFirst ();
ThreadId = cursor.getLong (1);
}
} finally {
Cursor.close ();
}
}
Log.i (threadId, String.valueOf (threadId));
Return threadId;
}
Private, long, getThreadId () {
Long threadId = 0;
String SMS_READ_COLUMN = read;
String WHERE_CONDITION = SMS_READ_COLUMN + = = 0;
String SORT_ORDER = date DESC;
Int count = 0;
Cursor cursor = mContext.getContentResolver ().Query
Uri.parse (content://sms/inbox),
New, String[], {_id, thread_id, address, person, date, body},
WHERE_CONDITION,
Null,
SORT_ORDER);
If (cursor = = null) {
{try
Count = cursor.getCount ();
If (count 0) {
Cursor.moveToFirst ();
ThreadId = cursor.getLong (1);
}
} finally {
Cursor.close ();
}
}
Log.i (threadId, String.valueOf (threadId));
Return threadId;
}
Copy code
2, delete SMS
Long id = getThreadId ();
Uri mUri=Uri.parse (content://sms/conversations/ + ID);
MContext.getContentResolver ().Delete (mUri, null, null);
Copy code
This removes text messages in this way, and if you want to delete it by other conditions, it will prompt you to delete it without permission.
Many of Androids functions are needed permission to operate, there are still many functions we can direct operation, only need to specify permissions in the configuration file on the line, but although some authority indicated, but would still be pr
您可能关注的文档
- 13春《中国古代文学作品选读》在线作业(13 spring selected readings of ancient Chinese Literature online homework).doc
- 13个国际贸易专业术语(13 international trade terms).doc
- 13年秋北航《生产与运作管理》在线作业二答案(In the autumn of 13 northern production and operation management online homework answer two).doc
- 13春学期《路基路面工程》在线作业2(13 spring term subgrade and pavement engineering online homework 2).doc
- 13种迹象表明你在浪费生命,但你可能不承认(There are 13 signs that you are wasting your life, but you may not admit it).doc
- 13.基础实验(13. basic experiment).doc
- 14杯特效滋补养颜茶(14 cups special effect nourishing tea).doc
- 12星座外形体态特点全揭露(12 constellation shape, body characteristics, full disclosure).doc
- 10法学的概念(10, the concept of law).doc
- 15-波峰焊技术的应用现状与未来 ___(Application of 15- wave soldering technology and future ___).doc
- android源码编译错误处理(Android source code compiler error handling).doc
- android界面的美化shape的使用(Android interface landscaping shape use).doc
- android知识小结(Android知识小结).doc
- android编译apk(编译Android APK).doc
- android编译全过程(Android编译全过程).doc
- antibiotics(抗生素)(抗生素(抗生素)).doc
- alias常见问题解答!(Alias faq!).doc
- apktool用法(Apktool usage).doc
- apk编译(Apk compilation).doc
- apache全能综合配置(Apache all-around configuration).doc
最近下载
- 广东省紧密型县域医共体(已挂牌)名单明细表1126.doc VIP
- [产品_解决方案概述]华为FusionAccess桌面云解决方案6.2概述.pdf VIP
- 《华科概率论与数理统计课件——概率论》.ppt VIP
- 图集规范-浙江图集-2010浙G22管桩.pdf VIP
- 中建八局高大模板施工标准化图册(盘扣架脚手架)2024年 .pdf VIP
- 一种竹质柱状活性炭及其制备方法和应用.pdf VIP
- Mogas金属硬密封球阀的构造特点.docx VIP
- T-CECS 10107-2020超高性能混凝土(UHPC)技术要求(OCR).pdf
- 2025年高考真题解析课件:2025年全国新高考二卷英语读后续写(课件).pptx VIP
- 《江南逢李龟年》课件.pptx VIP
文档评论(0)