2010-06-18 118 views
0

我希望能够阅读Android手机版本1.5中的所有联系人。如何阅读Android 1.5手机中的所有联系人?

请帮帮我。清单readble含量的不同和例子我们在此先感谢

+0

我发现很难理解。你究竟想要做什么?你有什么问题? – 2010-06-18 11:49:04

回答

1

对于ListActivity你可以有

Cursor C = getContentResolver().query(People.CONTENT_URI, null, null, null, null); 
startManagingCursor(C); 

String[] columns = new String[] {People.NAME}; 
int[] names = new int[] {R.id.row_entry}; 

mAdapter = new SimpleCursorAdapter(this, R.layout.mycontacts, C, columns, names); 
setListAdapter(mAdapter);