Android Address Book Search

by mike » Wed, 02 Jun 2010 01:15:14 GMT

Sponsored Links
 hi guys,

i have developed a application which loads all the contacts in the
native address book.
since i have many contacts i created a search.

my address book contains contacts like this.


and then again


1. even in the native address book it's the same. may i know the
reason for that. (All my contacts are in phone book)

2. i using phones.CONTENT_URI to load all the contacts. that's how i
want to do it

and assume that i have search for Alan or Bill search query returns

but if i search foe Alex,Cooper or Dillon it will return the correct

this is my query

        private Cursor searchItems(String query) {
                Cursor cur = getContentResolver().query(Phones.CONTENT_URI , 
                                Phones.NAME + "='" + query.trim() + "'", null, 
                int x = cur.getCount();
                if (cur == null || x == 0) {
                        // alert("Address Book", "Empty Address Book");
                if (cur.moveToNext()) {
                        do {
                                Log.d("CURSOR_SSSS", Integer.toString(x));
                        } while (cur.moveToNext());
                columns = new String[] { Phones.NAME, Phones.NUMBER };
                names = new int[] {, };
                return cur;

could somebody help me out??



Other Threads

1. Manual Verify of jar files?

Hi, I was wondering if a tool exists to manually verify whether or not
a certain library, possibly in the jar format is compatible with
Android. I always end up getting Verify Errors in the middle of
development while using certain libraries and quite unsure which
portions of the libraries are causing the errors. Thanks.


2. I have an Android G1 phone, how can I download .apk to my G1 phone?

I have an Android G1 phone and I want to download my application to
this phone. Is there any official document or tutorial for
downloading .apk from computer to G1 phone available now?


3. browse localhost using android emulator

4. Application Organization and Structure

5. login to a web site from android application.

6. apkbuilder.bat faulty?

7. : How to stops the activity from getting restarted when mode changes from LandScape to Portrait or vice-versa