• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Trying to read a Contact

ROHara

Lurker
Oct 30, 2008
2
0
I am trying to read from (and eventually write to) the Contacts database. Here is a code fragment:

String[] projection = new String[]
{ People._ID, People.NAME, People.NUMBER};
Uri contacts = Uri.parse("content://contacts/people");
Cursor mCursor = managedQuery(contacts, projection,
null, null, null);

In the emulator, this code fragment dies on the managedQuery call with this error:

java.io.IOException: An established connection was aborted by the software in your host machine

Adding the READ_CONTACTS permission has no effect. I am at a loss at how to debug this.

Does anyone out there see where I am going astray?

Thanks, Bob
 

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones