android - Check for contacts having app installed -


i building application users able interact contacts of device(using phonenumber) have application installed ( pretty how whatsapp, viber function)

now functionality can achieved function getcontacts()

  1. storing app registrations on server
  2. from app, sending contact server , receiving in server response, registered contacts

however, leads problems of synchronization in cases contacts added/deleted or existing ones updated

for this, knowledge guides me 3 alternatives

  1. everytime app launched, call getcontacts() method data retrieved fresh
    • not sure if method used whatsapp & viber, achievable lot of unnecessary processing during each launch
  2. have background service poll server through getcontacts() method
    • this can keep contacts synchronized
    • however, not refresh changes instantaneously. in whatsapp, if change name of contact, reflected instantanouesly
  3. register contentobserver on contactscontract.content_uri ( not of idea on )

please provide insights


Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -