Windows Phone 8 Maps and Location Services

Download Report

Transcript Windows Phone 8 Maps and Location Services

.Net APIs
Windows
Runtime
APIs
Track location changes
Desired accuracy
Movement threshold
PositionChanged
StatusChanged
Start & Stop
Periodic and distance based tracking
Desired accuracy in meters
Single location request
Caching and timeout
Position source
A-GPS
Wi-fi
Cell
Location Tracking
private
private
public void
new
// or
public void
Single Location Request
public async
new
await
return
Tips for Location Apps
Windows Phone 8 Map Control
110+ Countries, vector maps, 3D landmarks, new map modes
Downloadable by users, MapsDownloader tasks expose download
and update to developers
Smooth interactions, lag-less overlays, rotation, pitch
Easy to display Route calculated via Maps Services
Windows Phone Maps Services
Latitude,Longitude to Address
Address to Latitude,Longitude
RouteQuery, Route, RouteLeg, RouteManeuver
Map Control &
Service
APIs
Map Toolkit
Extensions
ID_CAP_MAP and
ID_CAP_LOCATION
Developer Token assigned
through Windows Phone
Developer Center
Part of Windows Phone Toolkit
MapsUserControl
PushPin
ToGeoCoordinate
.Net
Windows Phone 7.x Maps API
Bing Maps Control
Bing Maps Task
Map Control and Services Takeaway
Location Tracking in Background
defaultTask Name="_default" NavigationPage="
BackgroundExecution
ExecutionType Name="
BackgroundExecution
defaultTask
16
"
Background Execution Constraints
17
Resource Management
User Awareness and Control
Deactivation
App Lifecycle Events
Launching
Deactivated
Activated
Closed
Application Lifecycle
running
activated
tombstoned
deactivated
suspended
deactivated
Application Lifecycle for Location Tracking
running
running in
background
activated
tombstoned
suspended
deactivated
Application Lifecycle – Launching&Closing
Closing
Launching
Not Running
Launching
Launching
Running
Running in
Background
Closing
Application Lifecycle – Launching&Closing
Closing
Launching
Not Running
Running
Launching
Launching
Closing
RunningInBg
Closing
Running in
Background
Tips for Running in Background
Fast Resume for Windows Phone 8 Apps
<defaultTask Name ="_default" NavigationPage="
ActivationPolicy="Resume"/>
"
Fast Resume UX
30
Backstack – Do nothing
Backstack – Clear page stack
Backstack – Clear page stack
Backstack - Cancel navigation
Backstack - Cancel navigation
Navigation Events
raised on page at the top of the backstack; indicates that the app is relaunched
raised when a page is created for new launch Uri
raised when launch Uri is same as the page at the top of the backstack
NavigationMode.Reset
NavigationMode.Reset - Resume
NavigationMode.Reset – Start Fresh
Fast Resume Takeaway
Take Away
http://phone.codeplex.com