开发者

content://sms/inbox query

开发者 https://www.devze.com 2022-12-28 13:06 出处:网络
I use Android 1.6. I\'d like to que开发者_C百科ry \"content://sms/inbox\". How to implement it?Part of the SDK or not, I can\'t see any way to access SMS data other than using content://sms/inbox

I use Android 1.6. I'd like to que开发者_C百科ry "content://sms/inbox". How to implement it?


Part of the SDK or not, I can't see any way to access SMS data other than using content://sms/inbox

String folder = "content://sms/inbox" -or- "content://sms/sent"

Uri mSmsQueryUri = Uri.parse(folder);
String columns[] = new String[] {"person", "address", "body", "date","status" 
String sortOrder = "date ASC"; 
Cursor c = _context.getContentResolver().query(mSmsQueryUri, columns, where, null, sortOrder);

This will give you a Cursor to access what you need.

Take a look at gTalkSMS. The file to look at for SMS database queries is the SmsMmsManager.


This is not part of the Android SDK. Please do not use it.

0

精彩评论

暂无评论...
验证码 换一张
取 消