how do I get a List of all contacts that have a Faxnumber? (Undepending wether work/home fax)
otherwise I found
public static final int TYPE_FAX_HOME = 5 but I dont know how to use this =/
thx a lot in advance!
my code: (I ONLY get the default-phoneNumber, I have to use a filter anyhow)
Using java Syntax Highlighting
- String columns[] = new String[] {People.NAME, People.NUMBER};
- Cursor c = managedQuery(People.CONTENT_URI, columns, null, null, Contacts.People.DEFAULT_SORT_ORDER);
- if(c.moveToFirst())
- {
- String name = null;
- String phoneNo = null;
- int i = 0;
- do
- {
- name = c.getString(c.getColumnIndex(People.NAME));
- phoneNo = c.getString(c.getColumnIndex(People.NUMBER));
- System.out.println(" Name = " + name+" Number = "+phoneNo);
- if(i<c.getCount())
- {
- i++;
- }
- } while (c.moveToNext());
- }
Parsed in 0.014 seconds, using GeSHi 1.0.8.4