Reputation: 10980
How can I monitor a file on Google Drive in the most efficient way in my android Application? I prefer not to use a polling mechanism because of the possible unneeded data traffic involved.
On the Google developers site I found the following information: https://developers.google.com/drive/v2/reference/files/watch But I cannot find any examples where this has been applied (e.g. how to use the channel, how to integrate this in a sync adapter etc.).
Upvotes: 1
Views: 2187
Reputation: 945
With Google Play services 4.3 we can now register callbacks to be notified when a file changes.
Upvotes: 0
Reputation: 9213
Watch notifications can only be received by web hooks at the moment, we're going to be extending the notifications to the mobile environments soon. For now, you need to poll files.get
to see if there are any changes.
Upvotes: 1