Talk:A Windows Phone 8 Run Tracking App in 100 Lines of Code!

From Nokia Developer Wiki
Jump to: navigation, search


Yan -


In Background Location Tracking section, you write

With Windows Phone 7 you could run applications under the lock screen, which is a pretty important feature for a sports tracking application.

But i thinks you want explain

With Windows Phone 7 you can not run GPS tracking in background, which is a pretty important feature for a sports tracking application.


When you use map control, you must use an Mapid provided with your dashboard, isn't it?

yan_ 22:48, 7 December 2012 (EET)

Hamishwillee - Review/feedback


I've given this a very superficial scan, but figure its worth giving you the feedback as there aren't many days left.

Firstly, I use run tracking apps, so I like the concept and I think it is well explained. A few suggestions:

  1. Rename article and description to "run tracker app" or similar, rather than running app. Reason being that "This article explains how to create a running app using Windows Phone 8" could be interpreted as "how to create an active app... "
  2. The article covers lots of interesting features - polylines, headings, pedestrian maps, running in the background etc etc. However the introduction only talks about your motivations to write. People care much more about what they can learn so I strongly suggest you put an overview of these features first and foremost in the introduction - explain what your app does in only one hundred lines!
  3. A picture tells a thousand words. I would include one or two screenshots up in the introduction below the text. I would also move the UI image in "The Application User Interface" to the top, and then show the XAML which produces it.

That is all cosmetic stuff, but I believe will make the value of this article immediately more obvious to readers.

Thank you



hamishwillee 08:42, 11 December 2012 (EET)

Colin E. - Re:Review/feedback

@Hamish - thanks for this feedback, some good points there. I have expanded a few parts of the article and incorporated your feedback.

Colin E. 13:59, 12 December 2012 (EET)

Colin E. - RE: Yan - WP7 apps running under lock screen

Hi Yan,

No ... my text is correct. WP7 applications can run under the lock screen. See the documentation for ApplicationIdleDetectionMode:


Colin E. 14:01, 12 December 2012 (EET)

Hamishwillee - Looks great.

Thanks - well integrated. Nothing more to add other than to wish you luck.



hamishwillee 04:48, 13 December 2012 (EET)

Sugamanand - Facing a problem


Great App!

I'm unable to find the NExtra.Geo namespace in VS 2012 when I'm trying to add this code in my app.

What to do? I want to integrate this feature in my app! Please help!



sugamanand (talk) 01:40, 5 July 2013 (EEST)

Madhu72kumar - error when button is paused and played again


App is working great but displaying error when paused and played again.Before the distance values changes from 0 to any number, If we pause the app, then it shows"Overflow Exception was handled by user code - Make sure you are not dividing by zero." I was in middle of my app which i have taken reference of this sample app. You would have updated this app with Isolated Storage.


Madhu Kumar.

madhu72kumar (talk) 13:48, 20 July 2013 (EEST)

Madhu72kumar - @ Sugamand

Hi Sugamand,

If you want to add this feature to your app, you need to add class files from Geo folder to your application. you can find NExtra.Geo namespace in this class files. I hope your problem will be solved.


Madhu Kumar.

madhu72kumar (talk) 13:44, 20 July 2013 (EEST)

Marknotgeorge - Marknotgeorge - .Net Extra Library unavailable.

This is a great example of the power of the Windows Phone and Maps APIs, and is an inspiration in my current project. I've noticed, however, that the .Net Extra library doesn't seem to be available. So to calculate the heading, I'm using this method:

private double CalculateBearing(GeoCoordinate start, GeoCoordinate end)

           Angle lat1 = Angle.FromDegrees(start.Latitude);
           Angle lat2 = Angle.FromDegrees(end.Latitude);
           Angle dLon = Angle.FromDegrees(end.Longitude) - Angle.FromDegrees(end.Longitude);
           var y = Math.Sin(dLon.Radians) * Math.Cos(lat2.Radians);
           var x = Math.Cos(lat1.Radians) * Math.Sin(lat2.Radians) - 
               Math.Sin(lat1.Radians) * Math.Cos(lat2.Radians) * Math.Cos(dLon.Radians);
           Angle brng = Angle.FromRadians(Math.Atan2(y, x));
           return (brng.Degrees + 360) % 360;
The Angle class is from the very excellent Units for .Net library. Of course, this adds a few lines of code, but what can you do?

marknotgeorge (talk) 19:11, 8 February 2014 (EET)

Marknotgeorge - Doh...

I spotted a bug.

The 3rd line should of course be:

Angle dLon = Angle.FromDegrees(end.Longitude) - Angle.FromDegrees(start.Longitude);

marknotgeorge (talk) 17:14, 9 February 2014 (EET)