0 down vote favorite

Hi,

I am trying to read the contact list using the following code:

ContentResolver cr = getContentResolver();
Cursor cur = cr.query(People.CONTENT_URI,null, null, null, null);
if (cur.getCount() > 0) {

while (cur.moveToNext())
{
   String id = cur.getString(cur.getColumnIndex(People._ID));
       Cursor personCur = cr.query(Contacts.Phones.CONTENT_URI,
                null,
                Contacts.Phones.PERSON_ID
+"= ?"+
Contacts.Phones.NUMBER_KEY ,
                    new String[]{id}, null);

            String phoneKey = "";
            while (personCur.moveToNext()) {
                phoneKey =
personCur.getString(personCur.getColumnIndex(Contacts.Phones.NUMBER_KEY));

            }

The problem is that phoneKey return in reverse order meaning if the
phone number is 054-123-4567 the value is 7654321450

I could not find any documentation on this issue. Any idea how to fix
it? or is it the expected result?

thanks -Z

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to