How to listen for Contacts that have been added?

SmeSme USMember ✭✭✭
edited August 2016 in Xamarin.Forms

My app reads the user's contact list, and displays all the contacts. If the user leaves the app to add a new contact, what is the best way to have this new contact be updated into my app? For example, if you open WhatsApp and go to the contact page, then leave the app and add a new contact, upon returning to the app, the contact will be automatically updated and added to your WhatsApp contact list. This is the behavior I am looking for

Right now, the contact list in my app is simply created once upon creation of the contact list page. Is there any way to 'listen' to see if the phones contact list has been updated, and to therefore update the contact list in my app?

Posts

  • AlessandroCaliaroAlessandroCaliaro ITMember ✭✭✭✭✭

    Maybe a background thread could help? Or you should take a look to Contact API and use some dependencyservice...

  • SmeSme USMember ✭✭✭

    Thanks, I will definitely look into that. I forgot to add, that I am currently focusing on the UWP app, and I don't think the API has any sort of content observer. I guess for now (for the UWP app at least), I will just read the contact list upon resuming the app, and if there are any changes between the newly read list and the old list, I will then apply the changes.

Sign In or Register to comment.