What is the best approach from a performance perspective to show a ListView with contacts and their phone numbers?
Turn Off/On "Hide Contacts Without Numbers" It is also possible that 'Hide Contacts Without Numbers' functions have been enabled after the Android update. It happens sometimes, and due to the activation of this option, Android not showing contact names. So, you have to just disable this option from the settings.
In my opinion a mix solution should be better. Why this? Because you don't know or it's suppose that in most of contexts you cannot know about how and how many contacts your application will need to list. An also how many contacts are stored in the phone. If we know both answers, surely we can take the most approach solution.
So I suggest you to first bring a fix number of contacts using an in-memory array in a background thread, for example the first 20. Also if you consider that your app will perform more than one request to this service.. it will be awesome to use a sort of caching. The worst approach should be to call again and again the contacts service. Then for a request for contact #21 you can bring next 20 and so on.
So you can use the advantages of both worlds, and minimize the disadvantages too. Always depends on the application and the context that we are talking about.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With