Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Android Exception
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 4:35am
Edited 27-Jul-12 4: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
0 OriginalGriff 7,355
1 DamithSL 5,199
2 Sergey Alexandrovich Kryukov 4,942
3 Maciej Los 4,906
4 Kornfeld Eliyahu Peter 4,514


Advertise | Privacy | Mobile
Web02 | 2.8.141223.1 | Last Updated 6 Aug 2012
Copyright © CodeProject, 1999-2014
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