{
"latitude": 50.856134,
"licensePlate": "TSA-214",
"longitude": 4.356331,
"plannedEndDate": "2014-08-16T18:00:34.000Z",
"registeredDevices": [
"I7zyZjpICMYSNK6huVgTBulMsicI8++mv2kk8K5c7BA="
],
"startDate": "2014-08-15T16:40:23.329Z",
"type": "parkingSession"
}
Where registeredDevices contains a like of APNS device tokens to which I want to send push notifications when certain changes happen to this document.
For example, when an endDate field is added to this document, it means the parking session is over and I need to notify all the devices that registered to this document.
How can I do that when I track the changes feed on the sync gateway using something like Ektorp for example? Is there a proper way to get the previous revision of a document so that I can compare it with the current one and see that an endDate field has been added?
On Aug 18, 2014, at 10:00 AM, Sebastien ARBOGAST <sebastien...@gmail.com> wrote:
How can I do that when I track the changes feed on the sync gateway using something like Ektorp for example? Is there a proper way to get the previous revision of a document so that I can compare it with the current one and see that an endDate field has been added?
--To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/313DADC7-6563-40E2-97B0-A6A573D7DB48%40couchbase.com.
You received this message because you are subscribed to the Google Groups "Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mobile-couchba...@googlegroups.com.
On Aug 19, 2014, at 10:35 AM, Sebastien ARBOGAST <sebastien...@gmail.com> wrote:And it that OK to use those revisions in a business feature like that. I though I read somewhere that document revisions were designed for sync gateway to handle conflicts and they should not be used for functional purposes like that?
Also, where can I find documentation on how to track document changes on Sync Gateway using Java, and possibly hide those REST requests behind library methods?