2010-03-01 106 views

回答

3

下面的代码:

// Retrieve a Cursor pointing to the sms list and the size of it. 
Uri uriSMSURI = Uri.parse("content://sms/inbox"); 
Cursor cur = mContext.getContentResolver().query(uriSMSURI, null, null, null, null); 
boolean ret = cur.getCount() > 0; 

记得在之后关闭游标。

+0

谢谢,这似乎是我正在寻找的解决方案 – Olivier69 2010-03-01 13:44:57

0

你应该看看this,它不是一个简单的单线程,但它会给你你需要的数据。似乎有没有形成文件的方式来很容易地做到这一点,你将不得不做手工劳动的很多还是希望有人写一个lib做这一切为你