Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

New Developer
Posts: 37
Registered: ‎07-13-2014
My Device: Z10

Contacts Listing issue in Q10

Hi All,


I have used ContactService api to retrieve blackberry phone contacts. The problem which is occuring is that phone has in total 400 contacts but when i retrieve the contacts using contact service api only 22 are displayed everytime on gui of application.


Device being used for testing is blackberry q10. The code snippet is as below:-


 QList<Contact> contacts;
 ContactListFilters filter;
 contacts = m_contactService->contacts(filter);


This QList<Contact> retrieved is used for displayed on gui screen.


This list has only 22 contacts instead of 400 everytime i run this application.


Please suggest.


Thanks & Regards

Posts: 6,146
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30

Re: Contacts Listing issue in Q10

The query has a default limit (25 if I remember correctly) per call and misses out certain accounts.


A quick search in these forums will give more complete answers.

If you've been helped click on Like Button, if you've been saved buy the app. :smileyhappy:

Developer of stokLocker, Sympatico and Super Sentences.
New Developer
Posts: 37
Registered: ‎07-13-2014
My Device: Z10

Re: Contacts Listing issue in Q10

Thanks for replying well i searched in forums and found that yes in default it shows only some of the contacts we need to change the filter by calling the method 



Here the value set as argument will decide number of contacts displayed.


But there is a doubt .  As stated in below thread:-




setLimit with argument as 0 displays all the contacts, does this really works or is it a bug.  Please clarify some more on this, because as stated in thread it says that app crashes after setLimit was given argument as 0


Thanks & Regards