java - 如何使用查询在 android 中获取被阻止的 SMS 或 MMS?
问题描述
我想在 android(galaxy S8+) 中获取被阻止的 SMS 列表。我试过这个
Uri uri = Uri.parse("content://sms?simple=true");
//Log.d("TAG","reached");
ContentResolver con=getContentResolver();
if(con==null){
Log.d("TAG","contentResolver not exist");
return;
}
Cursor cursor = con.query(uri, null, "spam_report=?", new String[]{"1"},"date_sent DESC");
和这个
Uri uri = Uri.parse("content://sms?simple=true");
//Log.d("TAG","reached");
ContentResolver con=getContentResolver();
if(con==null){
Log.d("TAG","contentResolver not exist");
return;
}
Cursor cursor = con.query(uri, null, "locked=?", new String[]{"1"},"date_sent DESC");
这段代码的结果并没有给我想要的结果。如何获取被阻止的消息(彩信或短信)!!
解决方案
推荐阅读
- android - 如何删除原生标签的边框
- java - 无法使用 Kafka connect json api 使用 Json 消息
- android - 单击另一个 RecyclerView 的项目时更新 RecyclerView 的内容
- c++ - Q文件。设备未打开
- ios - 手动隐藏搜索栏控制器
- python - 未在 tkinter python 上分配全局变量
- python - 使用 heroku repo 减少 slug 大小,但不断收到“此时无法运行一次性进程。请稍后再试。” 信息
- javascript - 如何使用方法保存和加载对象?
- javascript - WordPress - 尝试在注册表单中添加“上传图片”部分
- git - Gitignore 不会忽略文件