On Fri, Oct 30, 2009 at 7:25 PM, agirardello <[email protected]>wrote:
> > Try to use: > > android.provider.ContactsContract.Contacts.CONTENT_URI > It works. Thanks! > > > > On Oct 28, 7:10 am, Yao <[email protected]> wrote: > > Hi guys, > > > > I can't get contacts via content provider in Android 2.0 emulator. The > test > > code is pasted. When I click "Account" in the menu, it shows "Force > close". > > Thanks a lot in advance for your help! > > > > Cursor cursor = > getContentResolver().query(Contacts.People.CONTENT_URI, > > new String[] {"_id"}, null, null, null); > > while(cursor.moveToNext()) { > > String id = cursor.getString(0); > > Log.e("test", id); > > } > > cursor.close(); > > > > -- > > Best regards, > > MTM > > Contacts GroupU - Group your Android Contactshttp:// > contacts-groupu.appspot.com > > > -- Best regards, MTM Contacts GroupU - Group your Android Contacts http://contacts-groupu.appspot.com --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

