文档介绍:IT-Homer 专栏
成功是优点的发挥,失败是缺点的积累! 不为失败找理由,只为成功找
方法……
Android Contacts(一)——读取联系人
分类: Android 2012-03-07 14:01 858人阅读评论(0) 收藏举报
Introduction To Android Contacts
Learn to work with the Android contacts database. Basic knowledge of accessing SQLite in Android along with
using Cursors is expected. See the Android SQLite and Cursor Article for more information. Google changed
the contacts database moving from to versions of Android. This tutorial will be broken into 3 sections.
First covering accessing contacts in Android . The second page will deal with accessing the contacts in
Android and before. Third we'll glue it all together with a class that abstracts specific classes for each
version and a set of classes to manage the data from the contact records.
Contacts 读取代码:
.;
import ;
import ;
import ;
import ;
import ;
import ;
import ;
import ;
import ;
public class phoneRead extends Activity {
***@Override
public void onCreate(Bundle savedInstanceState){
(savedInstanceState);
showListView();
}
private void showListView(){
ListView listView = new ListView(this);
ArrayList<HashMap<String, String>>