My app creates calendar events, where the event's description has a contact name in it. When the user changes the contact name using Phone's Contacts, I would like the change to flow to the calendar event's description field.
What is the best method to do that?
I can think of two options. Both include a copy of the contact names in my own database. When a change occurs, find records changed records and update the calendar event.
The issue is how to efficiently move the new name to my database.
- Register a Content Observer on Contacts and compare all contact names.
- Use a sync adapter
Which method is really more efficient?
I am not familiar with sync adapters, but I assume that the adapter does not need an account (is there such a thing?), and I would like the change to flow Immediately (i.e. not at the next scheduled sync)
Any help, including a different direction altogether would be much appreciated.