I want to set a push notification for a folder in google drive using google api such that any changed made to any file inside that folder than i get a call -back.
Turn on notifications In Chrome Browser, open Drive. and select Settings. On the left, click Notifications and choose an option: To receive updates on your web browser, check the Get updates about Google Drive items in your browser box, and select the items you want to be notified about.
On your computerThey'll automatically update to Drive on the web.
To help manage your tasks, Google is adding a notifications tab inside the Drive app for Android that allows you to view activity on every file you have stored in the cloud. The new notifications menu can be found inside the Drive app for all Google accounts — though we should note, it isn't live for everyone yet.
In Google DocsYou won't get notifications when you make changes on your doc, but you'll get notifications when anyone adds or removes content.
What I know is that its not possible at this moment. Instead of that you can create changes
hook and get informed if ANY file on drive is changed. After theat run file search request to find all files within given folder by passing its ID, ie:
"'<folder_id>' in parents"
where <folder_id>
is id of the folder where you want to look for changes. You can then look for last modified date and compare to your own cache, for example stored on your server in cache files. If file is newer than do with it whatever you want (and of course update cache).
please refer to: https://developers.google.com/drive/v2/reference/changes/watch https://developers.google.com/drive/web/search-parameters
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With