We're building an application where we need to check if there is already an existing contact in the native Android phone book by searching by phone number and e-mail.
I have a contact with the phone number: 123-456-7890 in my Contacts. In my application I'm doing the following, but nothing ever matches. Can somebody help me out? public Boolean matchingContacts() { Boolean matchesFound = false; String[] projection = new String[] { android.provider.Contacts.Phones.NUMBER, }; Cursor managedCursor = managedQuery(android.provider.Contacts.People.CONTENT_URI, projection, android.provider.Contacts.Phones.NUMBER + "=\'" + "123-456-7890" + "\'", null, null); if (managedCursor.isFirst()) { Log.d("MatchingContacts", "Found a match!"); } return matchesFound; } --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---