Reputation: 2402
In my application, I'm extracting all the contacts and upload them to the server. But there's a problem. I know how to extract all the contacts, but is there any way to get the newest contacts?
For example: The first time I open the app, I upload all the contacts but the other times I don't want to upload all of them, just the newest.
Do you know any way to do it?
Thanks!
Upvotes: 2
Views: 212
Reputation: 17930
If your contacts have some order (by ID, by Name), you can save the identifier of the last contact you saved and the next time just check to see if there is a contact with identifier bigger than the last one you saved.
For example:
Upvotes: 1