dear friend

i want to fetch ma contact inbox with name and number as simple as possible
it's urgent i m going threw below code but i can able to find only name not
number plz it's urgent to get help u frnds


public void onCreate(Bundle savedInstanceState) {

        super.onCreate(savedInstanceState);

        String[] projection = new String[] { People._ID, People.NAME };
        Cursor cursor = managedQuery(People.CONTENT_URI, projection, null,
null, People.NAME + " ASC");

        ListAdapter adapter = new SimpleCursorAdapter(
            this,
            android.R.layout.two_line_list_item,
            cursor,
            new String[] { People._ID, People.NAME },
            new int[] { android.R.id.text1, android.R.id.text2 }
        );
        setListAdapter(adapter);

        getListView().setOnItemClickListener(this);


    }

    public void onItemClick(AdapterView<?> adapterView, View view, int
position, long id) {

        Uri contactUri = ContentUris.withAppendedId(People.CONTENT_URI, id);
        Intent intent = new Intent(this, ContactDetails.class);
        intent.setData(contactUri);
        startActivity(intent);

    }

}

Ever+ Never-
@kh!l R@v@l

(+91-96388-66691)
(+91-74052-63600)

-- 
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