Click here to Skip to main content
12,300,260 members (57,409 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
Edited 27-Jul-12 3:37am
v2

1 solution

Rate this: bad
 
good
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...
  Permalink  

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
Web01 | 2.8.160525.2 | Last Updated 6 Aug 2012
Copyright © CodeProject, 1999-2016
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