惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

云风的 BLOG
云风的 BLOG
有赞技术团队
有赞技术团队
Simon Willison's Weblog
Simon Willison's Weblog
人人都是产品经理
人人都是产品经理
L
LINUX DO - 最新话题
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
A
Arctic Wolf
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
小众软件
小众软件
Jina AI
Jina AI
The Cloudflare Blog
P
Palo Alto Networks Blog
AWS News Blog
AWS News Blog
阮一峰的网络日志
阮一峰的网络日志
C
Cybersecurity and Infrastructure Security Agency CISA
Know Your Adversary
Know Your Adversary
T
Threat Research - Cisco Blogs
L
Lohrmann on Cybersecurity
NISL@THU
NISL@THU
G
GRAHAM CLULEY
Project Zero
Project Zero
博客园_首页
博客园 - 三生石上(FineUI控件)
罗磊的独立博客
Spread Privacy
Spread Privacy
WordPress大学
WordPress大学
Hugging Face - Blog
Hugging Face - Blog
Latest news
Latest news
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
C
Cisco Blogs
C
Cyber Attacks, Cyber Crime and Cyber Security
T
Tor Project blog
S
Securelist
V
Vulnerabilities – Threatpost
T
The Exploit Database - CXSecurity.com
C
CERT Recently Published Vulnerability Notes
IT之家
IT之家
Google DeepMind News
Google DeepMind News
爱范儿
爱范儿
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
The Last Watchdog
The Last Watchdog
T
Tenable Blog
宝玉的分享
宝玉的分享
S
Secure Thoughts
P
Privacy & Cybersecurity Law Blog
量子位
大猫的无限游戏
大猫的无限游戏
J
Java Code Geeks
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Security Archives - TechRepublic
Security Archives - TechRepublic

博客园 - 晓光

Android系统的进程,任务,服务的信息 Android程序如何安装到内存或卡中 (转)解决Debug certificate expired的问题 (转)Android ViewGroup的onInterceptTouchEvent()事件分析 (转)禁止横屏和竖屏切换 (转)Android Bitmap 与 Drawable之间的转换 (转)Android中两种设置全屏的方法 (转)Android之getSystemService (转)SQL Server Compact Edition 数据库连接字符串 (转)Android Project Structure (转)SqlDateTime溢出类错误解决 C# 数据库连接字符串集合 - 晓光 - 博客园 Android Activity生命周期 Flex HttpService,WebService简单介绍 (转)Flex Module通信(2)——使用事件 (转)Flex Modules通信(1)——通过接口 (转)Canvas不能接收 rollOver和roolOut事件的解决方案 - 晓光 - 博客园 (转)FLEX中使用outerDocument - 晓光 - 博客园 (转)C# Hashtable Synchronized vs SyncRoot
Android获取手机短信
晓光 · 2011-07-10 · via 博客园 - 晓光

在Android中,短信数据库的字段为:

_id                       短消息序号 
thread_id            对话的序号(conversation)
address               发件人地址,手机号
person                 发件人,返回一个数字就是联系人列表里的序号,陌生人为null
date                     日期  long型,想得到具体日期自己转换吧!
protocol              协议
read                     是否阅读
status                   状态
type                      类型 1是接收到的,2是发出的
reply_path_present
subject                 主题
body                     短消息内容
service_center      短信服务中心号码编号,可以得知该短信是从哪里发过来的

获取短信的代码为:

Uri SMS_CONTENT = Uri.parse("content://sms/"); 

Cursor cursor = context.getContentResolver().query(SMS_CONTENT,null,null,null,null);

while(cursor.moveToNext()){
          
                system.out.print(cursor.getString(cursor.getColumnIndex("address")));

                system.out.print(cursor.getString(cursor.getColumnIndex("body")));

            }
            
        }