Hi all,
I face a problem with method GetAll of Contacts2 object, library Phone.
My app loads the list of all names and phone numbers from phone. I use following code:
Problem is, that in my physical phone, there are roughly 500 phone numbers and this line of code takes 12 seconds to execute. During that time, telephone displays message "Sorry ! Activity is not responding. Force close / Wait", which botheres users. Good thing is, that after clicking Wait, application finishes loading of contacts and everything goes on.
I tried to put
before .GetAll method and
after .GetAll, so users know what is going on, but "sand clock" froze suddenly and in some seconds I got message "Sorry ! Activity is not responding. Force close / Wait" even while ProgressDialogShow was visible. It seems to me, that method .GetAll freezes also ProgressDialogShow process.
Please, could you advise me how to either speed up .GetAll method or keep user somehow informed, that he/she should be patient and wait longer?
Thank you.
I face a problem with method GetAll of Contacts2 object, library Phone.
My app loads the list of all names and phone numbers from phone. I use following code:
B4X:
Dim allContacts As Contacts2
Dim listOfAllContacts As List
listOfAllContacts = allContacts.GetAll(True, False)
Problem is, that in my physical phone, there are roughly 500 phone numbers and this line of code takes 12 seconds to execute. During that time, telephone displays message "Sorry ! Activity is not responding. Force close / Wait", which botheres users. Good thing is, that after clicking Wait, application finishes loading of contacts and everything goes on.
I tried to put
B4X:
DoEvents
ProgressDialogShow("...")
DoEvents
B4X:
DoEvents
ProgressDialogHide
Please, could you advise me how to either speed up .GetAll method or keep user somehow informed, that he/she should be patient and wait longer?
Thank you.