Reputation: 7563
I've subscribed on google calendar push notifications (PN). Base synchronization processes using PN. I need to know if all events already loaded in calendar scope or not.
Is it possible to have a special marker in my request answer (request events for specified calendar based on subscribed channel information)?
If calendar has too much events, events will be loaded in few push notifications handling. I need marker for UI if calendar is synchronized completely. In my my usual logic I thought that calendar is already synchronized if first PN per calendar already handled. So I need notify my UI client with correct status (calendar_is_synchronnized
, calendar_is_not_synchronnized
) but I do not have any markers from google if the PN provides me load last events portion in specified calendar scope.
Upvotes: 1
Views: 91
Reputation: 7563
I haven't got elegant solution for my question. But I've solved issue with double call
. The is no special API for this purpose, I've used algorithm:
after updating to sync token I try get all events for same calendar just to be able compare new
nextSyncToken
with current if it is the same. if token is different if means the calendar sync is not completed yet.
If any better idea(s), you are welcome.
Upvotes: 1