1
votes

Is there any way to add location for proximity alert in windows phone 8 ?

For example .Suppose I have added a particular location xyz with radius 50 meter .Once user entered in the location xyx proximity alert should be triggered .

How to do this?

I did in android but I do not know how to do in windows phone 8 . I checked official documentation as well as I googled but I got nothing

Any help is appreciated

1
If you have the goal long/lat and the users current long/lat you can use math to calculate the distance between the two coordinates. Here is an exemple of the formula: movable-type.co.uk/scripts/latlong.htmlrobertk
Yeah That I can do but I am asking is there any inbuilt api for this just like android . Because in android if you added a location for proximity it will trigger an event once it entered in the regionuser1825863
No I'm quite sure you have do to these calculations by yourself.robertk
Okay Thank you so much for the quick responseuser1825863

1 Answers

1
votes

WP7/WP8 doesn't allow for full multitasking. As such having a background process open at all times listening to geoloc changes isn't a possibility.

Depending on your usecase though you could consider using WP8 geolocation tracking background support. Your app first has to be launched by the user and if may remain open in the background as long as it's tracking location and no other location tracking app has been activated. You can read more about how to create geolocation tracking apps on MSDN @ http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj662935%28v=vs.105%29.aspx

A good example for when a geolocation tracking app can be used for proxmity alerts is an easter egg hunt game. After the user launches the app they can move it to the background and have it popup ShellToasts and Tile updates corresponding to a user's location.