In my WP8 application I need to download some json data every 5 minutes.
But in MSDN it\'s written that periodic tasks are run every 30 minutes.
Are there any wor
I think this might be do your work.try this.
dispatcherTimer = new System.Windows.Threading.DispatcherTimer();
dispatcherTimer.Tick += new EventHandler(dispatcherTimer_Tick);
dispatcherTimer.Interval = new TimeSpan(0,5,0);
dispatcherTimer.Start();
And DispatcherTimer_Tick Method
private void dispatcherTimer_Tick(object sender, EventArgs e)
{
//Do your Method...
}
Go to MSDN Dispatcher Timer for more Details.
You can use push Notification, or rawnotification dependent on how much data is needed to be send. And when the app is in foreground you can accomplish what you want with a timer? But using background tasks is not possible.
Toast Notifications
Server Side
Sorry, you can't run a true background task more frequently than the standard intervals. You can, however, get the data as often as you like when the app is running in the foreground, but be aware that you might upset your users if there's a lot of data to pull.