Pooya1 Active Member Licensed User Jul 2, 2018 #1 Hi I need update my contact database when user add or delete contact in device I can get list contact every time in app but if user have 100 contact so it take a minute for get contacts So it is better i register broadcast receiver about contact Do android have CONTACT add or delete filter?
Hi I need update my contact database when user add or delete contact in device I can get list contact every time in app but if user have 100 contact so it take a minute for get contacts So it is better i register broadcast receiver about contact Do android have CONTACT add or delete filter?
Erel B4X founder Staff member Licensed User Longtime User Jul 3, 2018 #2 It shouldn't take a minute to get 100 contacts. Use ContactsUtils.FindAllContacts with VisibleOnly = True. Upvote 0
It shouldn't take a minute to get 100 contacts. Use ContactsUtils.FindAllContacts with VisibleOnly = True.
Pooya1 Active Member Licensed User Jul 3, 2018 #3 Erel said: It shouldn't take a minute to get 100 contacts. Use ContactsUtils.FindAllContacts with VisibleOnly = True. Click to expand... Yes i use it But suppose user have more than 500 contacts and i get list contacts in first It is OK here Bun i need app check user contacts and if user add new contact,app add it to database If i use receiver for detect add or delete contact i can reload contacts in this event no each activity started Upvote 0
Erel said: It shouldn't take a minute to get 100 contacts. Use ContactsUtils.FindAllContacts with VisibleOnly = True. Click to expand... Yes i use it But suppose user have more than 500 contacts and i get list contacts in first It is OK here Bun i need app check user contacts and if user add new contact,app add it to database If i use receiver for detect add or delete contact i can reload contacts in this event no each activity started
Erel B4X founder Staff member Licensed User Longtime User Jul 3, 2018 #4 ContentObserver will not really help as it will only find changes while your app is running. There isn't any library that wraps it. Measure the time it takes to get all contacts. It should be fast enough. If not then switch to ContentResolver.QueryAsync. Get all contacts when your app resumes. Upvote 0
ContentObserver will not really help as it will only find changes while your app is running. There isn't any library that wraps it. Measure the time it takes to get all contacts. It should be fast enough. If not then switch to ContentResolver.QueryAsync. Get all contacts when your app resumes.
Pooya1 Active Member Licensed User Jul 3, 2018 #5 Erel said: ContentObserver will not really help as it will only find changes while your app is running. There isn't any library that wraps it. Measure the time it takes to get all contacts. It should be fast enough. If not then switch to ContentResolver.QueryAsync. Get all contacts when your app resumes. Click to expand... No i prefer use ContactUtil class,it is well If you say so is it good solution Upvote 0
Erel said: ContentObserver will not really help as it will only find changes while your app is running. There isn't any library that wraps it. Measure the time it takes to get all contacts. It should be fast enough. If not then switch to ContentResolver.QueryAsync. Get all contacts when your app resumes. Click to expand... No i prefer use ContactUtil class,it is well If you say so is it good solution