android - 我无法从 Android 的 Kitkat 版本的收件箱中删除短信

标签 android sms inbox

这是我的短信删除代码:

if (context.getContentResolver().delete(Uri.parse("content://sms/inbox"), "date=? and body=?",
 new String[] { ctime, mess }) > 0) {
      Log.e("latest msg", "deleted");
}

最佳答案

除非您的应用程序在“设置 -> 更多...”下被选为“默认短信应用程序”,否则您不能。

http://developer.android.com/about/versions/kitkat.html#44-sms-provider

关于android - 我无法从 Android 的 Kitkat 版本的收件箱中删除短信,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21552458/

相关文章:

android - "match_parent"自 Android SDK 版本 18 起有时行为不正确

php - 让使用手机浏览器的用户通过短信发送他们想要的产品代码

python - 使用 AWS 发送短信时设置消息发送者

android - Google Inbox 会截断 mailto : body parameter 中 `=` 之后的所有内容

android - 如何从android代码打开默认邮件收件箱?

android - 在两个 fragment 之间传递数据

c# - 无法引用该项目。引用的项目针对不同的框架系列

android - 如何从 Android 中删除短信。拉德工作室

php - 消息系统中如何处理删除?

android - 为什么 findFirstVisibleItemPosition 不能按预期工作?