android 提取指定号码短信内容 比如说我想提取15555215556这个号码中的短信内容该怎么做啊 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 ContentResolver cr = getContentResolver(); Uri uri = Uri.parse("content://sms/"); String[] projection = new String[]{"address","body"}; Cursor cur = cr.query(uri, projection, null, null, null); if(cur!=null && cur.getCount()>0){ cur.moveToFirst(); do{ String phoneNumber = cur.getString(cur.getColumnIndex("address")); if(phoneNumber.equals("15555215556")){ Log.e("短信内容:",cur.getString(cur.getColumnIndex("body"))); } }while(cur.moveToNext()); } 求助 请教:在线播放mp3的问题 请教高手一个有关GridView的难题!!!!!! android 自带数据库联合查询 一个android prject,想作为两个app,装在手机上两次,在线等 android GLSurfaceView显示图片的问题!!!! 自定义ScrollLayout继承ViewGroup动态添加gridView,长按冲突 android窗口最小化后,我想再恢复他最大化显示,代码怎么写呢 请教:android转换json字符串 Android URLconnection 如何获取控件的宽度 源码里面:屏幕锁定提示音的相关实现代码是在哪里实现的啊?
Uri uri = Uri.parse("content://sms/");
String[] projection = new String[]{"address","body"};
Cursor cur = cr.query(uri, projection, null, null, null);
if(cur!=null && cur.getCount()>0){
cur.moveToFirst();
do{
String phoneNumber = cur.getString(cur.getColumnIndex("address"));
if(phoneNumber.equals("15555215556")){
Log.e("短信内容:",cur.getString(cur.getColumnIndex("body")));
}
}while(cur.moveToNext());
}