- String row = "";
- int loopCount = 0;
- Cursor contactsRow = getContentResolver().query(Phone.CONTENT_URI,
- null,
- null,
- null,
- null
- );
- while(contactsRow.moveToNext()){
- for(int i = 0; i < contactsRow.getColumnCount(); i++){
- row += "\n" + contactsRow.getColumnName(i) + " : " + contactsRow.getString(i);
- }
- row += "\n\n\n\n\n\n\n";
- if(loopCount++ >= 40){
- break;
- }
- }
- TextView textArea = (TextView)findViewById(R.id.textArea);
- textArea.setText(row);
전화번호 기준으로 row 생성됨
'Android' 카테고리의 다른 글
태스크란? (Task, Activity Stack) (0) | 2011.03.14 |
---|---|
Custom Dialog 주소록 정보 출력 (0) | 2011.02.08 |
SMS 정보 (0) | 2011.02.01 |
content://sms/ 필드명 (0) | 2011.02.01 |
Custom Dialog (0) | 2011.02.01 |