Keeping Contacts updated

#1

After successfully loading phone contacts to my Expo App, I would like to know if Expo offers any tool to track changes on Phone contact list. For example when user adds new contact or delete an existing one… is there any event listener for this? Can you recommend me an efficient way to implement this task?

#2

Hi there, I don’t think there’s a built-in way to listen for updates, but all contacts objects from our Contacts API contain a persistent id field. So the best bet is probably to write a generic method to synchronize your local contacts representation by comparing whatever the API returns with whatever you already stored for that id. Then you could synchronize whenever it makes sense, e.g. when the user navigates to the right screen in your app.