Page 1 of 1
Detect change in contacts?
Posted: 14 Dec 2019 18:08
by jassing
Is there a way to detect a change to the contacts database?
I have a flow that shows a list of contacts with mobile numbers, but it takes 30 seconds to run the load portion. I want to cache the list, and reload only when needed.
Re: Detect change in contacts?
Posted: 14 Dec 2019 19:08
by Desmanto
So far I can't find the broadcast intent after contact has been changed. But at least at the logcat, there are some lines indicating the contact has been changed. It is still not a good solution to log all the time just for contact.
How often do you change the contact info? And how critical it is to be updated to the most recent ones? Maybe just set a interval to reload the contact everyday. Or you can use app task ended for the contact and add a prompt whether you want to reload the list.
Re: Detect change in contacts?
Posted: 14 Dec 2019 19:15
by jassing
Found it... Content provider change. Luckily it was one of the pre-fill options.
Re: Detect change in contacts?
Posted: 14 Dec 2019 19:19
by Desmanto
Oh yeah. I missed it. I almost never use it.