Presentation is loading. Please wait.

Presentation is loading. Please wait.

Advanced Windows Mobile Application Development

Similar presentations


Presentation on theme: "Advanced Windows Mobile Application Development"— Presentation transcript:

1 Advanced Windows Mobile Application Development
MGB 2003 Advanced Windows Mobile Application Development © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

2 Introduction Application Development
MGB 2003 Introduction Application Development The .NET Compact Framework contains a number of built-in User Interface Controls Often you will need additional controls Derived from existing controls or written from scratch Since resources are limited on a Windows Mobile Device it makes sense to re-use functionality Pocket Outlook exposes a lot of functionality Common Dialogs are available for all applications © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

3 Advanced Forms Development Custom Controls
MGB 2003 Advanced Forms Development Custom Controls Most Common Controls are suitable for Device Development Properties, methods and events are a subset of the Common Controls of the full .NET Framework Derive from Common Controls to extend functionality Override properties, methods and events Define additional properties, methods and events Your custom control inherits functionality from the common control and builds upon it © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

4 Advanced Forms Development Sample Custom Controls
MGB 2003 Advanced Forms Development Sample Custom Controls TextBox that accepts numeric input only TextBox to enter / validate phone numbers Label that accepts click events © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

5 Creating custom User controls
MGB 2003 Creating custom User controls © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

6 MGB 2003 Inheritance options UserControl – if you plan to compose control from existing ones Control – if you will draw a control by yourself, it contains less overhead © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

7 To add new control to Control Library
MGB 2003 To add new control to Control Library Select project, then Add | New Item and select Custom Control © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

8 Using Pocket Outlook Today (1) Managed APIs to access Pocket Outlook
MGB 2003 Using Pocket Outlook Today (1) Managed APIs to access Pocket Outlook Wraps POOM Using and managing Personal Information Manager items inside your own application Contacts, Appointments, and Tasks , Microsoft® Systems Management Server accounts, and messages Consistent interface to access information © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

9 Using Pocket Outlook Today (2) Managed APIs to access Pocket Outlook
MGB 2003 Using Pocket Outlook Today (2) Managed APIs to access Pocket Outlook Add a reference to Microsoft.WindowsMobile.PocketOutlook Use an instance of type OutlookSession to access PIM (Personal Information Management) information) Add new properties Not exported to Outlook, for use on device only Dispose of the OutlookSession when done! © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

10 Using Pocket Outlook Today (3) Pocket Outlook Classes
MGB 2003 Using Pocket Outlook Today (3) Pocket Outlook Classes © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

11 Adaptive Applications Device Differences
MGB 2003 Adaptive Applications Device Differences Differences breakdown into 3 categories Availability of touch-screen support Different Form Factors Extended capabilities Windows Mobile version .NET Compact Framework version Available Hardware © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

12 Adaptive Applications
MGB 2003 Adaptive Applications Operating system version Environment.OSVersion.Version .NET Compact Framework runtime version Environment.Version . Does device have a phone? Windows Mobile 5.0 or greater SystemState.PhoneRadioPresent Prior to Windows Mobile 5.0 © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

13 Adaptive Applications More Device Characteristics
MGB 2003 Adaptive Applications More Device Characteristics State and Notifications Broker Available to Windows Mobile 5.0 and greater Windows Mobile 5.0: Nearly 110 states/characteristics Windows Mobile 6: Nearly 150 states/characteristics Retrieve device configuration information Managed code: ConfigurationManager Native code: QueryPolicy/DMProcessConfigXML Registry Limit use to information not available elsewhere © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

14 Location Aware Applications Introduction
10/26/2017 7:05 AM Location Aware Applications Introduction A number of devices have built-in GPS capabilities Also possible to use external GPS hardware GPS Intermediate Driver abstracts actual GPS receiver details from developers Managed wrappers available in Windows Mobile 6 / Windows Mobile 5.0 SDK samples Multiple applications can share the GPS hardware © 2007 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.

15 Location Aware Applications GPSID Features
MGB 2003 Location Aware Applications GPSID Features Allows ‘high level’ access of the GPS Hardware by using the ‘parsed API’ No need to parse NMEA strings yourself For applications, the GPS Intermediate Driver looks like the physical GPS hardware For the GPS hardware, the GPS Intermediate Driver is the single client using it For managed code take a look at Microsoft.WindowsMobile.Samples.Location © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

16 Location Aware Applications Managed Application Development
MGB 2003 Location Aware Applications Managed Application Development Microsoft.WindowsMobile.Samples.Location © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

17 Location Aware Applications Managed Application Development
MGB 2003 Location Aware Applications Managed Application Development public partial class MainForm : Form { private Gps gps; private GpsPosition position; private void MainForm_Load(object sender, EventArgs e) Gps = new Gps(); gps.LocationChanged += new LocationChangedEventHandler(gps_LocationChanged); gps.Open(); } private void MainForm_Closing(object sender, EventArgs e) gps.LocationChanged -= gps_LocationChanged; gps.Close(); © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

18 Location Aware Applications Managed Application Development
MGB 2003 Location Aware Applications Managed Application Development void gps_LocationChanged(object sender, LocationChangedEventArgs args) { ControlUpdater cu = UpdateControl; if (args.Position.LatitudeValid) Invoke(cu, tbLatitude, args.Position.Latitude.ToString()); if (args.Position.LongitudeValid) Invoke(cu, tbLongitude, args.Position.Longitude.ToString()); } private delegate void ControlUpdater(Control c, string s); private void UpdateControl(Control c, string s) c.Text = s; © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

19 Location Aware Applications Testing your apps with FakeGPS
MGB 2003 Location Aware Applications Testing your apps with FakeGPS Allows testing location aware applications without having GPS hardware on the device Also ideal for poor satellite reception Requires no changes to your application Fakes data received by the GPS APIs \Program Files\FakeGPS\GPSFiles Contains NMEA data © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

20 MGB 2003 © 2008 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. © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.


Download ppt "Advanced Windows Mobile Application Development"

Similar presentations


Ads by Google