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

  • Home
  • SEARCH
  • 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 7973841
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T08:13:05+00:00 2026-06-04T08:13:05+00:00

I am new to Windows Phone 7. I am developing a project in wp7,

  • 0

I am new to Windows Phone 7.

I am developing a project in wp7, in that project for every 60 sec I need to send my latitude longitude details to web service(asmx).

I have a background service and am connect to asmx service to it. when I update my details on asmx need to show toast message on phone, but I unable to do it, plz help me

here is my background service code

          protected override void OnInvoke(ScheduledTask task)
               {

        watcher = new GeoCoordinateWatcher(GeoPositionAccuracy.Default);
        watcher.Start();
        string useremail = task.Description.ToString();
        string latitude = watcher.Position.Location.Latitude.ToString();
        string longitude = watcher.Position.Location.Longitude.ToString();

        ServiceReference1.UpdateUserLocationSoapClient obj = new ServiceReference1.UpdateUserLocationSoapClient();
        obj.UpdateUserLocation1Completed += new EventHandler<ServiceReference1.UpdateUserLocation1CompletedEventArgs>(obj_UpdateUserLocation1Completed);
        obj.UpdateUserLocation1Async(useremail, latitude, longitude);   
        // If debugging is enabled, launch the agent again in one minute.
        #if DEBUG_AGENT
        ScheduledActionService.LaunchForTest(task.Name, TimeSpan.FromSeconds(5));
        #endif

        // Call NotifyComplete to let the system know the agent is done working.
        NotifyComplete();
    }

private void obj_UpdateUserLocation1Completed(object sender, ServiceReference1.UpdateUserLocation1CompletedEventArgs e)
{

        ShellToast toast = new ShellToast();



        toast.Title = "kk";
        toast.Content = "ss" + e.Result.ToString();
        toast.Show();


    } 
  • 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-06-04T08:13:07+00:00Added an answer on June 4, 2026 at 8:13 am

    To communicate between your application and your background agent, you should use a Mutex.

    A example : http://www.31a2ba2a-b718-11dc-8314-0800200c9a66.com/2011/11/this-is-continuation-of-this-post.html

    EDIT : Remove NotifyComplete(); from OnInvoke and put it in obj_UpdateUserLocation1Completed

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing a windows phone application. I'm new in WP7 app development. In my
I've Started developing Windows Phone application. Creating a new project causes the exception below
I am new to windows phone. I am developing a web-app and the test
All, I am new to Windows 7 Phone. My situation is that I have
I'm new to RestSharp. And I use it in my Windows Phone 7.1 project.
I'm developing an app for Windows Phone 7 that populates a WrapPanel with a
I am new in windows phone development. Now I am developing a windows phone
I am developing the Windows Phone 7, I need to add images to ListBox.
I am developing a windows phone 7 application. I am new to windows phone
I am new to the windows phone 7 development world. I am developing an

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.