Frage

in my Android app I have a ContactList downloaded from web. I need it in many parts of the app, so i download it at login. This call is paginated, so i need to call the method many times (depends of the contacts number), and I've seen that REST call in 3g connection are sequential. Users from their app can edit their name, surname, email. So I have to reload the contact list not only to add new ones, but to update users information too. The solution for this waste of time at login is to save my user array list into a file, at login open the file and use the old list and then, in background, dinamically download new fresh data and change every single user data with the new fresh one. Is this possible? how to do that?

War es hilfreich?

Lösung

you can use GCM for that which pushes updates to phone as soon as they happen on server. you can load the contacts at login, but as soon as something changes or created on server you can inform the user about it and can only load that Contact.

check link how to implement it

http://developer.android.com/google/gcm/index.html

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top