maarten struys windows mobile evangelist alten-pts session code: wmbyyy
TRANSCRIPT
![Page 1: Maarten Struys Windows Mobile Evangelist Alten-PTS Session Code: WMByyy](https://reader036.vdocument.in/reader036/viewer/2022070323/56649d9f5503460f94a8a404/html5/thumbnails/1.jpg)
![Page 2: Maarten Struys Windows Mobile Evangelist Alten-PTS Session Code: WMByyy](https://reader036.vdocument.in/reader036/viewer/2022070323/56649d9f5503460f94a8a404/html5/thumbnails/2.jpg)
Creating Location Aware Windows Mobile Apps
Maarten StruysWindows Mobile EvangelistAlten-PTSSession Code: WMByyy
![Page 3: Maarten Struys Windows Mobile Evangelist Alten-PTS Session Code: WMByyy](https://reader036.vdocument.in/reader036/viewer/2022070323/56649d9f5503460f94a8a404/html5/thumbnails/3.jpg)
Agenda
IntroductionRetrieving Location Information
Making use of Cell TowersMaking use of IP AddressMaking use of GPS
Developing Location-Aware applicationsWeb Services, Location, Windows Mobile and you
Conclusion
![Page 4: Maarten Struys Windows Mobile Evangelist Alten-PTS Session Code: WMByyy](https://reader036.vdocument.in/reader036/viewer/2022070323/56649d9f5503460f94a8a404/html5/thumbnails/4.jpg)
IntroductionLocation-Aware Applications
Technology offers a huge potentialAll about Positioning and Content
More than drawing maps inside applications
Navigation softwareLocalized news, weather, traffic, sportsDevice can tell others where it is
Tracking people or carsSocial Networking
![Page 5: Maarten Struys Windows Mobile Evangelist Alten-PTS Session Code: WMByyy](https://reader036.vdocument.in/reader036/viewer/2022070323/56649d9f5503460f94a8a404/html5/thumbnails/5.jpg)
IntroductionLocation and Windows Mobile
Most Windows Mobile Devices are phonesUse Cell Tower information for fast location fetch
Make use of existing lookup functionality
Most Windows Mobile Devices have WIFIUse access point for accurate, fast location fetch
Make use of Geo IP lookup services
More devices ship with built-in GPS hardwareUse GPS Intermediate Driver to retrieve locations
Managed wrappers available in Windows Mobile SDKs
![Page 6: Maarten Struys Windows Mobile Evangelist Alten-PTS Session Code: WMByyy](https://reader036.vdocument.in/reader036/viewer/2022070323/56649d9f5503460f94a8a404/html5/thumbnails/6.jpg)
Location RetrievalCell Tower
Fast but relatively inaccurate Location FetchAccuracy higher in densely populated areas
Works if there is phone coverageRetrieve Cell Tower Information through RIL
RIL_Initialize(); RIL_Deinitialize();RIL_CellTowerLookup();
Pass Cell Tower Information to a Lookup Servicehttp://www.codeproject.com/KB/mobile/DeepCast.aspxby ‘Acoustic’
![Page 7: Maarten Struys Windows Mobile Evangelist Alten-PTS Session Code: WMByyy](https://reader036.vdocument.in/reader036/viewer/2022070323/56649d9f5503460f94a8a404/html5/thumbnails/7.jpg)
Retrieving Location using Cell Towerdemo
![Page 8: Maarten Struys Windows Mobile Evangelist Alten-PTS Session Code: WMByyy](https://reader036.vdocument.in/reader036/viewer/2022070323/56649d9f5503460f94a8a404/html5/thumbnails/8.jpg)
Location RetrievalIP Address Lookup
Fast and reasonably accurate Location FetchAccuracy higher in densely populated areas
Works if there is WIFI coveragePass IP number to a Lookup Service
![Page 9: Maarten Struys Windows Mobile Evangelist Alten-PTS Session Code: WMByyy](https://reader036.vdocument.in/reader036/viewer/2022070323/56649d9f5503460f94a8a404/html5/thumbnails/9.jpg)
Retrieving Location using IP numberdemo
![Page 10: Maarten Struys Windows Mobile Evangelist Alten-PTS Session Code: WMByyy](https://reader036.vdocument.in/reader036/viewer/2022070323/56649d9f5503460f94a8a404/html5/thumbnails/10.jpg)
Location RetrievalGPS
Initial reading might be slow but very accurate Location FetchDoes not work well (if at all) inside buildingsLocation information available without additional lookup servicesEasy accessible through GPS Intermediate Driver
Windows Mobile 5 and Windows Mobile 6
![Page 11: Maarten Struys Windows Mobile Evangelist Alten-PTS Session Code: WMByyy](https://reader036.vdocument.in/reader036/viewer/2022070323/56649d9f5503460f94a8a404/html5/thumbnails/11.jpg)
Location RetrievalGPS Intermediate Driver
Allows ‘high level’ access of the GPS Hardware by using the ‘parsed API’
No need to parse NMEA strings yourselfFor applications, the GPS Intermediate Driver looks like the physical GPS hardwareFor the GPS hardware, the GPS Intermediate Driver is the single client using itLocation changes will be delivered event driven on a separate thread
![Page 12: Maarten Struys Windows Mobile Evangelist Alten-PTS Session Code: WMByyy](https://reader036.vdocument.in/reader036/viewer/2022070323/56649d9f5503460f94a8a404/html5/thumbnails/12.jpg)
Location RetrievalGPSID and Managed Applications
Microsoft.WindowsMobile.Samples.Location
![Page 13: Maarten Struys Windows Mobile Evangelist Alten-PTS Session Code: WMByyy](https://reader036.vdocument.in/reader036/viewer/2022070323/56649d9f5503460f94a8a404/html5/thumbnails/13.jpg)
Location RetrievalTesting GPS readings with FakeGPS
Allows testing location aware applications without having GPS hardware on the deviceAlso ideal for poor satellite receptionRequires no changes to your applicationFakes data received by the GPS APIs\Program Files\FakeGPS\GPSFiles
Contains NMEA dataYou can record your own NMEA data
![Page 14: Maarten Struys Windows Mobile Evangelist Alten-PTS Session Code: WMByyy](https://reader036.vdocument.in/reader036/viewer/2022070323/56649d9f5503460f94a8a404/html5/thumbnails/14.jpg)
Receiving Location through GPSdemo
![Page 15: Maarten Struys Windows Mobile Evangelist Alten-PTS Session Code: WMByyy](https://reader036.vdocument.in/reader036/viewer/2022070323/56649d9f5503460f94a8a404/html5/thumbnails/15.jpg)
Location Aware ApplicationsMake them independent of Location Retrieval
Different Location Retrieval methods have different accuraciesThe easiest to in your application is abstracting location retrieval
Use a Class FactoryRetrieve Location readings through an InterfaceApplication is only interested in Lat/Long readings, not where they come from
![Page 16: Maarten Struys Windows Mobile Evangelist Alten-PTS Session Code: WMByyy](https://reader036.vdocument.in/reader036/viewer/2022070323/56649d9f5503460f94a8a404/html5/thumbnails/16.jpg)
Location Aware ApplicationsDifferent catagories of applications
Line-of-Business ApplicationsFleet tracking + Route planning
Device publishes its location
Consumer ApplicationsOften a Collaboration between the Cloud & DeviceSmart Client Application (e.g. pictures + location)Location Aware bloggingSocial NetworkingFinding Friends
![Page 17: Maarten Struys Windows Mobile Evangelist Alten-PTS Session Code: WMByyy](https://reader036.vdocument.in/reader036/viewer/2022070323/56649d9f5503460f94a8a404/html5/thumbnails/17.jpg)
Location Aware ApplicationsSample Applications
Bing MobileGoogle MapsUpdate Twitter Status and automatically add location (+ optional link to a map)Share information with friends through Fire EagleAll kinds of Windows Live Services
Bing Maps alone has lots of different services
![Page 18: Maarten Struys Windows Mobile Evangelist Alten-PTS Session Code: WMByyy](https://reader036.vdocument.in/reader036/viewer/2022070323/56649d9f5503460f94a8a404/html5/thumbnails/18.jpg)
Sample: Updating Twitter Status
string user = Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes (Properties.Resources.TwitterUserName + ":" + Properties.Resources.TwitterPassword));StringBuilder sb = new StringBuilder("status=");sb.Append(locationInfo);if (additionalInfo != string.Empty){ sb.Append(" - "); sb.Append(additionalInfo);}byte[] data = Encoding.ASCII.GetBytes(sb.ToString());
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(TwitterStatusUpdateURI);request.Method = "POST";request.Headers.Add("Authorization", "Basic " + user);request.ContentType = "application/x-www-form-urlencoded";request.ContentLength = data.Length;Stream reqStream = request.GetRequestStream();reqStream.Write(data, 0, data.Length);reqStream.Close();
![Page 19: Maarten Struys Windows Mobile Evangelist Alten-PTS Session Code: WMByyy](https://reader036.vdocument.in/reader036/viewer/2022070323/56649d9f5503460f94a8a404/html5/thumbnails/19.jpg)
Location Aware ApplicationsRetrieving Maps through Bing Maps
Imagery ServiceMaps & Imagery for Mobile Devices
Search ServiceQueries to find keywords or locations
Geocode ServiceAddress to LatLong and LatLong to Address
Route ServiceGet directions and traffic info
![Page 20: Maarten Struys Windows Mobile Evangelist Alten-PTS Session Code: WMByyy](https://reader036.vdocument.in/reader036/viewer/2022070323/56649d9f5503460f94a8a404/html5/thumbnails/20.jpg)
Sample: Displaying Bing Maps
public Image GetMap(double latitude, double longitude){ // Set the location of the requested image mapUriRequest.Center = new VEImageryService.Location(); mapUriRequest.Center.Latitude = latitude; mapUriRequest.Center.Longitude = longitude; mapUriRequest.Center.LongitudeSpecified = true; mapUriRequest.Center.LatitudeSpecified = true;
// Retrieve a map (jpg) through a URL, provided by Virtual Earth MapUriResponse mapUriResponse = imageryService.GetMapUri(mapUriRequest); HttpWebRequest request = (HttpWebRequest)WebRequest.Create(mapUriResponse.Uri); HttpWebResponse response = (HttpWebResponse)request.GetResponse();
Image img = new Bitmap(response.GetResponseStream()); response.Close();
return img;}
![Page 21: Maarten Struys Windows Mobile Evangelist Alten-PTS Session Code: WMByyy](https://reader036.vdocument.in/reader036/viewer/2022070323/56649d9f5503460f94a8a404/html5/thumbnails/21.jpg)
Location Aware ApplicationsRetrieving information through Bing Services
Consistent Web Service to retrieve all kinds of information
MobileWebAdvertisementsImagesPhoneBook
Learn how to access one source of information and you know how to access them all
![Page 22: Maarten Struys Windows Mobile Evangelist Alten-PTS Session Code: WMByyy](https://reader036.vdocument.in/reader036/viewer/2022070323/56649d9f5503460f94a8a404/html5/thumbnails/22.jpg)
Sample: Using Bing Services
private void button1_Click(object sender, EventArgs e){ using (LiveSearchService service = new LiveSearchService()) { SearchRequest request = new SearchRequest(); request.AppId = Properties.Resources.LiveSearchAppID; request.Query = searchQuery; request.Sources = new SourceType[] {SourceType.MobileWeb }; SearchResponse response = service.Search(request);
foreach (MobileWebResult r in response.MobileWeb.Results) { listView1.Items.Add(new ListViewItem(r.Title)); } }}
![Page 23: Maarten Struys Windows Mobile Evangelist Alten-PTS Session Code: WMByyy](https://reader036.vdocument.in/reader036/viewer/2022070323/56649d9f5503460f94a8a404/html5/thumbnails/23.jpg)
A Location Aware Sample Applicationdemo
![Page 24: Maarten Struys Windows Mobile Evangelist Alten-PTS Session Code: WMByyy](https://reader036.vdocument.in/reader036/viewer/2022070323/56649d9f5503460f94a8a404/html5/thumbnails/24.jpg)
Summary
There are several ways to retrieve Location Information
Cell Tower Lookup; IP Number Lookup; GPSAdding Location to Windows Mobile Applications extend application richnessThink out of the Box
Make use of Web Services / Web Apps to increase the functionality of Windows Mobile Applications
Great opportunities for Business and Consumer oriented applications
![Page 25: Maarten Struys Windows Mobile Evangelist Alten-PTS Session Code: WMByyy](https://reader036.vdocument.in/reader036/viewer/2022070323/56649d9f5503460f94a8a404/html5/thumbnails/25.jpg)
question & answer
![Page 26: Maarten Struys Windows Mobile Evangelist Alten-PTS Session Code: WMByyy](https://reader036.vdocument.in/reader036/viewer/2022070323/56649d9f5503460f94a8a404/html5/thumbnails/26.jpg)
www.microsoft.com/teched
Sessions On-Demand & Community
http://microsoft.com/technet
Resources for IT Professionals
http://microsoft.com/msdn
Resources for Developers
www.microsoft.com/learning
Microsoft Certification & Training Resources
Resources
![Page 27: Maarten Struys Windows Mobile Evangelist Alten-PTS Session Code: WMByyy](https://reader036.vdocument.in/reader036/viewer/2022070323/56649d9f5503460f94a8a404/html5/thumbnails/27.jpg)
Complete an evaluation on CommNet and enter to win an Xbox 360 Elite!
![Page 28: Maarten Struys Windows Mobile Evangelist Alten-PTS Session Code: WMByyy](https://reader036.vdocument.in/reader036/viewer/2022070323/56649d9f5503460f94a8a404/html5/thumbnails/28.jpg)
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista 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.