Getting IM Ids from the contact database in 2.0

by Raj » Fri, 20 Nov 2009 04:36:01 GMT


Sponsored Links
 Finally I did this way and it works...

 String[] cols =
{ ContactsContract.Data.DATA1,ContactsContract.Data.DATA5};
           Cursor ims = getContentResolver().query(
                           ContactsContract.Data.CONTENT_URI,
                           cols,
                           ContactsContract.Data.CONTACT_ID +" = "+  id + " and 
"
                           + ContactsContract.CommonDataKinds.Im.MIMETYPE + " =
'vnd.android.cursor.item/im'",
                           null, null);

           while (ims.moveToNext()) {
                           String im = ims.getString(
                           ims.getColumnIndex(
                           ContactsContract.Data.DATA1));

                           Log.d(TAG,"Im : " + im);
           }
           ims.close();
where id is the contact id

Raj





--



Other Threads

1. update-an Froyo Samsung Galaxy S JP3

Kelihatannya samsung lagi semangat2nya nih update

I9000XXJP3

http://www.multiupload.com/FB7ZO0CAAO

bug report di XDA  http://forum.xda-developers.com/showthread.php?t=738961

Sayang tidak ada kabar buat spica

-- 
"Indonesian Android Community [id-android]" 

2. ROM rodriguez - Low space

Dear Brader,


Kemaren baru coba ROM Rodriguez, cm kok tiba-tiba ada notifikasi kalo low
space padahal sudah pindhain semua ke external.


Mohon masukannya....


Terima kasih

-- 
"Indonesian Android Community [id-android]" 

3. Beberapa android HTC titipan temen temen...

4. running executable.

5. How to prevent Runtime exception from SlidingDrawer onMeasure???

6. Load lots of Image from Internet and get Out-Of-Memory

7. Heads up, hold off updating to Java 1.6.0_21 on your dev machine