Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6252237
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T13:45:38+00:00 2026-05-24T13:45:38+00:00

With Mango, it’s possible to create a scheduled task to update the ShellTiles data.

  • 0

With Mango, it’s possible to create a scheduled task to update the ShellTiles data.

It’s up to the task to call NotifyComplete() when it’s done.

Given that I/O on the phone should be asynchronous, how do you ensure that your I/O is complete prior to calling NotifyComplete()?

Via synchronization primatives? Or will the I/O be allowed to complete once the Task has notified the phone’s OS it’s complete?

Sync primatives is the obvious answer, but on the phone, blocking isn’t really a good choice.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T13:45:39+00:00Added an answer on May 24, 2026 at 1:45 pm

    Scheduled tasks are not executed synchronously. They are started and then have 15 seconds to call NotifyComplete (or abort) before they are forcefully terminated.

    In direct answer to your question, you would use the asynchronous IO methods and then call NotifyComplete from the complete event or callback.

    Here’s an example. I’ve used the Microsoft.Phone.Reactive stuff but you can use Begin/EndGetResponse in the traditional way if you prefer.

    public class SampleTask : ScheduledTaskAgent
    {
        protected override void OnInvoke(ScheduledTask task)
        {
            HttpWebRequest request = WebRequest.CreateHttp("http://stackoverflow.com");
    
            Observable.FromAsyncPattern<WebResponse>(
                    request.BeginEndResponse,
                    request.EndGetResponse
                )()
                .Subscribe(response =>
                {
                    // Process the response
                    NotifyComplete();
    
                }, ex =>
                {
                    // Process the error
                    Abort(); // Unschedules the task (if the exception indicates 
                             // the task cannot run successfully again)
                });
    
            // Synchronous control flow will continue and exit the OnInvoke method
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm building a Mango app that writes data to a SqlCe database; I have
I know that in Mango, we can update the Tile's background locally. But StandardTileData.BackgroundImage
In the mango update will it be possible to start the app and set
I would like create alarm clock at windows phone 7 mango , for this
I'm developing a Mango app that connects to a local database, reads data from
What is the size limit for an mango windows phone app? i know that
I want to develop an application for Windows 7.5 mango OS phone like HTC
I'm trying to implement SQL Server CE code in Windows Phone 7.1 (Mango). I
In Windows Phone (mango) I am using Microsoft.Phone.Controls.Maps. I currently have: var _City =
I have a Mango WP7.5 app that uses a local SqlCe database. I would

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.