Download presentation
Presentation is loading. Please wait.
Published byCory Williams Modified over 9 years ago
1
30 April 2014 Building Apps for Windows Phone 8.1 Jump Start WinRT Apps & Silverlight
4
// The URI to launch string uriToLaunch = @"bingmaps:?cp=51.501156~-0.141706&lvl=17"; var uri = new Uri(uriToLaunch); Windows.System.Launcher.LaunchUriAsync(uri);
5
// The URI to launch string uriToLaunch = @"ms-drive-to:?destination.latitude=47.6451413797194" + "&destination.longitude=-122.141964733601&destination.name=Redmond, WA"; var uri = new Uri(uriToLaunch); Windows.System.Launcher.LaunchUriAsync(uri);
18
Location service Core logic CellWiFiGNSS Geofence core Geofencing WinRT API Geofences Microsoft Positioning Services Geocoordinate.NET API Geofence software tracking Geolocation WinRT API
20
Geolocator geolocator = new Geolocator(); geolocator.DesiredAccuracyInMeters = 50; try { Geoposition geoposition = await geolocator.GetGeopositionAsync( maximumAge: TimeSpan.FromMinutes(5), timeout: TimeSpan.FromSeconds(10) ); LatitudeTextBlock.Text = geoposition.Coordinate.Latitude.ToString("0.00"); LongitudeTextBlock.Text = geoposition.Coordinate.Longitude.ToString("0.00"); } catch (UnauthorizedAccessException) { // the app does not have the right capability or the location master switch is off StatusTextBlock.Text = "location is disabled in phone settings."; }
21
private void TrackLocation_Click(object sender, RoutedEventArgs e) { if (!tracking) { geolocator = new Geolocator(); geolocator.DesiredAccuracy = PositionAccuracy.High; geolocator.MovementThreshold = 100; // The units are meters. geolocator.StatusChanged += geolocator_StatusChanged; geolocator.PositionChanged += geolocator_PositionChanged; tracking = true; } else { geolocator.PositionChanged -= geolocator_PositionChanged; geolocator.StatusChanged -= geolocator_StatusChanged; geolocator = null; tracking = false; }
29
IdRequiredStringN/A GeoshapeRequired Geocircle (BasicGeoposition + Radius) N/A MonitoredStatesOptionalEntered/Exited/RemovedEntered/Exited SingleUseOptionalTrue/FalseFalse DwellTimeOptionalTimespan10s StartTimeOptionalDateTimeOffset0/epoch DurationOptionalTimespan0/forever
36
©2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, Office, Azure, System Center, Dynamics and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.