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. "Short" bookmarks like other browser

Hi,

i  would like to see a nice feature in the bookmark manager...if i add
a link as bookmark and use "am" as name, the browser should open it if
i write "am" in the address bar..

Nokia has this feature an i miss it at my G1...

Any others with the same wish?

Kind regards
--~--~---------~--~----~------------~-------~--~----~

2. about makefile structure

Hi All,
          I want to know about makefile structure of android.eg for
"make aidl" which makefile it is calling for building of this module
and order of calling .can anybody tell me about calling sequence of
makefile for single module.

Regards,
DJ
--~--~---------~--~----~------------~-------~--~----~
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

3. Create Shortcut for data-sync at desktop?!

4. How to write code to uninstall apk from device/emulator?

5. Dates Gone All Wrong On G1

6. X86 kernel patches

7. how to use the rild on OMAP2430