android通讯录,内存不足问题 [英] android contacts, out of memory problem

查看:70
本文介绍了android通讯录,内存不足问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我正在尝试使用ContentResolver.query(..)
检索我的联系人. 问题是,我有5000个联系人,当运行时,它用尽了内存,尽管可以处理1000个联系人,但我应该怎么做


这是游标的代码

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

推荐答案

转到设置
管理应用程序
并一一点击应用程序并将其转移到
记忆卡...

别忘了制作SD卡...
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...


这篇关于android通讯录,内存不足问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆