I’m trying to implement real-time notifications from Google Drive in my Universal Windows Platform app. I know I need to configure some kind of listener or webhook endpoint to handle incoming push events, but I’m completely lost on how to get started.
The main things I’m confused about are:
- How do I register my UWP app to receive these notifications?
- What kind of endpoint do I need to create?
- Are there any specific permissions or API setup steps I’m missing?
- How does the actual listening mechanism work in a UWP environment?
I’ve been searching for tutorials or guides but haven’t found anything that explains the process clearly for UWP apps specifically. If anyone has implemented this before, could you point me in the right direction or share the basic workflow? Even just knowing the main steps would help me get started.
Had this exact issue 6 months ago building a document sync feature. Polling beats webhooks for UWP - way more practical. Skip the complex webhook setup and just use Google Drive API’s changes endpoint with a background task every few minutes. Store the pageToken from previous requests so you only grab incremental changes. Keeps API calls light. Use ApplicationTrigger class to register your background task and check for file changes periodically. You’ll dodge all the webhook headaches and still get fresh updates. Users won’t notice the delay, and you won’t deal with external services or WNS setup. Just handle background execution limits properly and cache your auth tokens.
you can’t use uwp apps directly for webhooks cuz they lack stable endpoints. best bet is to set up something like azure functions to catch the webhooks and then relay those notifications to ur app via signalR or push notifications.
You’re right about the webhook approach, but there’s a catch. Google Drive’s push notifications need HTTPS endpoints that can handle POST requests - UWP apps can’t do this natively since they’re sandboxed and can’t host web servers. I built something like this last year and went with a two-tier setup. Created a simple web service on Azure App Service that registers as the webhook endpoint with Google Drive API. Then it uses Windows Notification Service (WNS) to send toast notifications straight to the UWP app. You’ll need Microsoft Store registration to get WNS credentials. For Google Drive, use the files.watch() method to subscribe to changes on specific files or folders. The annoying part is handling webhook verification and managing subscription renewals - they expire after a few hours. Make sure your service can handle Google’s initial verification challenge.