Tjenare,
om du vill hämta kontakters telefonnummer så ska du använda dig av Content Providers. Addressboken kan du komma åt via android.provider.Contacts.Phones.CONTENT_URI .
Dvs, ugefär:
Kod:
import android.provider.Contacts.People;
import android.database.Cursor;
// Form an array specifying which columns to return.
String[] projection = new String[] {
People._ID,
People._COUNT,
People.NAME,
People.NUMBER
};
// Get the base URI for the People table in the Contacts content provider.
Uri contacts = People.CONTENT_URI;
// Make the query.
Cursor managedCursor = managedQuery(contacts,
projection, // Which columns to return
null, // Which rows to return (all rows)
null, // Selection arguments (none)
// Put the results in ascending order by name
People.NAME + " ASC");
Du kan läsa mer på http://developer.android.com/guide/topics/providers/content-providers.html