How to reduce the contacts loading time?
I am developing an app which 开发者_如何学运维loads the contacts from phone,i am facing a problem of time taken by the contacts at loading from phone ,it takes much time when the contacts are loaded .I have tried two different views for displaying the contacts but loading time did not get affected.
I am picking contacts name as well as phone numbers of four types like mobile , work,home and other. Please guide me. Thanks in advance.
btnPick.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
//Intent intent = new Intent(Intent.ACTION_PICK, ContactsContract.Contacts.CONTENT_TYPE);
Intent intent = new Intent(Intent.ACTION_PICK);
//intent.setType(ContactsContract.Contacts.CONTENT_TYPE);
intent.setType(ContactsContract.CommonDataKinds.Phone.CONTENT_TYPE);
startActivityForResult(intent, PICK_CONTACT);
// startActivityForResult(intent, PICK_CONTACT);
}
});
this is d code that pass d intent to the contect & so not it is the time consuming
and also add in manifeast
精彩评论