Click here to Skip to main content
13,056,966 members (43,900 online)
Rate this:
Please Sign up or sign in to vote.
hi everyone, i'm trying to retrieve my contacts , using ContentResolver.query(..)
the problem is, i have like 5000 contacts, and when running, it runs out of memory, it's working fine though with something like 1000 contacts, what should i do

here is the code for the cursor

final String[] CONTACT_PROJECTION = new String[] { Contacts._ID,
		Contacts.DISPLAY_NAME, };
ContentResolver cr = getContentResolver();
Uri contacts = Contacts.CONTENT_URI;
Cursor cur = cr.query(contacts, CONTACT_PROJECTION, null, null,
		Contacts.DISPLAY_NAME + " ASC");

thanks for ur help
Posted 27-Jul-12 3:35am
Updated 27-Jul-12 3:37am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Go to setting
manage application
and click on one by one application and transfer it into the
card memory...

Don't forget to make sd card...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170728.6 | Last Updated 6 Aug 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100