Reputation: 885
My app has a simple polling mechanism that checks the database for new messages and I want it to update the tile and send a toast notification when a new message is recieved. This works fine when the app is active, but if I switch to another app the updates don't work. I'm guessing it's because the app has been suspended, so would creating a background task to do this work?
The main I issue I see from what I've read about background tasks is that they only can run at most once every 15 minutes, but I want to check for messages about every 30 seconds. The lync app sends a toast notification whenever a message is recieved so I know it's possible to do, just not sure how.
Upvotes: 0
Views: 576
Reputation: 10609
The Lync app most likely uses push notifications for the toast and tile updates.
The current functionality around background tasks weren't designed for very quickly polling as that would destroy things like battery life on the device.
I would recommend using some sort of server to do the polling and then do the notifications to the client. Azure Mobile Services might be the best approach.
Upvotes: 2