What Are The New APIs in Windows Mobile 5.0?

The following information is described in greater detail in What's New for Developers in Windows Mobile 5.0 in the MSDN Library. In addition to the new APIs, the white paper also covers the development tools and some platform migration considerations.

Windows Mobile 5.0 offers many new APIs. Although these new APIs are spread across a number of different services, they are all focused on the common goal of improving developer productivity. This goal is achieved by incorporating many commonly performed tasks in the operating system, thereby allowing application developers to focus on the specific needs of individual applications.

For the first time, Windows Mobile 5.0 exposes operating system features directly to managed developers. These new managed APIs include newly added operating system features in addition to newly provided managed classes for existing operating system features.

The new APIs fall into three groups:

  1. New native APIs
  2. Existing operating system features that are now exposed as managed APIs
  3. Newly added APIs available to both native and managed developers
  4.  

    New Native APIs

    Direct3D Mobile
    By using Direct3D Mobile, developers can take advantage of their existing desktop computer Direct3D skills and code to produce rich three-dimensional gaming environments for Windows Mobile devices. Direct3D Mobile takes full advantage of graphics hardware support and enables the development of high-performance three-dimensional rendering on mobile devices.

    DirectDraw
    For applications needing to directly manipulate display memory, provide high-speed two-dimensional graphics, or incorporate digital video, Windows Mobile 5.0 provides the DirectDraw API. By providing a common abstraction over the device display hardware, DirectDraw provides application developers with the ability to directly manipulate device display hardware in a device-independent way.

    DirectShow
    A rapidly increasing number of mobile devices now include cameras. For developers who want their applications to interoperate with these camera-enabled devices, there is the DirectShow API. DirectShow provides applications the capability to manage and access camera hardware enabling capture and playback of high-quality pictures and streaming video. DirectShow abstracts the details of individual camera hardware providing application developers with a common and consistent programming interface.

    Global Positioning Systems
    The GPS Intermediate Driver provides a very simple-to-use API for providing shared access to GPS data. Through the GPS Intermediate Driver, Windows Mobile greatly reduces the amount of code required to interact with a GPS device and allows multiple applications to interrogate the GPS device for configuration and positioning information simultaneously.

    Uniquely Identifying a Device
    For applications that need to uniquely identify individual devices, Windows Mobile 5.0 includes the GetDeviceUniqueID API. By using GetDeviceUniqueID, ISVs can now easily protect intellectual property by licensing software to a specific device. Corporate developers will also find it useful for tracking data and application distribution to specific devices.

    Digital Rights Management
    Digital Rights Management (DRM) remains an important part of protecting and distributing intellectual property. For some application developers, supporting the differences among the various DRM engine APIs slows application development and reduces code portability. To eliminate these issues, Windows Mobile 5.0 provides the File-Based Digital Rights Management (FDRM) API. FDRM provides a common programming interface across the different DRM engines that improves developer productivity and code portability. Developers now only need to target FDRM without regard for the specific DRM engine being used.

    ActiveSync Interaction
    Developers can now start and stop the ActiveSync synchronization process from the device by using ActiveSyncStart and ActiveSyncStop.

    Operating System Features Newly Exposed as Managed APIs

    Telephony
    Windows Mobile 5.0 now exposes basic telephone behavior through the Microsoft.WindowsMobile.Telephony.Phone class. By using the new Phone class's Talk method, developers can program applications to initiate a phone calls and optionally prompt users to verify the numbers before the call is placed.

    Outlook Mobile
    Personal Information Manager (PIM) data is at the heart of many mobile device applications, and Windows Mobile has provided an excellent PIM system for many years in Pocket Outlook. Windows Mobile 5.0 now exposes Pocket Outlook directly to managed developers through the classes in the "Microsoft.WindowsMobile.PocketOutlook" namespace and assembly of the same name. With the new managed Pocket Outlook API, developers can easily incorporate PIM data as part of their applications.

    Messaging
    In addition to providing access to PIM data, the Pocket Outlook object model provides managed support for both e-mail and Short Message Service (SMS) messages through "Microsoft.WindowsMobile.PocketOutlook.EmailAccount" and "Microsoft.WindowsMobile.PocketOutlook.SmsAccount" namespaces respectively. The classes in these namespaces enable managed code developers using all versions of the .NET Compact Framework to easily integrate messaging into their applications.

    Configuration Manager
    Windows Mobile 2003 introduced the introduction of the Configuration Manager, which tremendously simplified configuring and deploying Windows Mobile devices because developers could set neartly all configurable aspects of a device by using XML. By using the "Microsoft.WindowsMobile.Configuration.ConfigurationManager" namespace and assembly, managed developers can now take full advantage of this capability.

    Newly Added APIs Available to Both Native and Managed Developers

    State and Notification Broker API
    Windows Mobile 5.0 introduces a new and very powerful facility called the State and Notification Broker API. The State and Notification Broker API provides a unified mechanism for storing device, application, and system-state information. Beyond simply being a unified store, it provides a centralized notification architecture, allowing applications to easily register for notification, optionally starting an application in the event that a value of interest should change. The model allows applications to easily share their own state information as well. Windows Mobile 5.0 devices ship with well over one hundred different state values available through the State and Notification Broker.

    Picture Selection Dialog
    As applications increasingly incorporate photos and graphics, these applications need an easy way to present a list of pictures to a user for selection. To address this need, Windows Mobile 5.0 provides a picture selection dialog.

    Camera Capture API
    Camera enabled devices are extremely popular. With these devices being so widely available, application developers now have the opportunity to substantially enhance the user experience by integrating the capture of both still and video images directly into their applications. To enable application developers to easily provide this functionality, Windows Mobile 5.0 provides the camera capture dialog.

    Pocket Outlook Enhancements
    To further simplify and enrich application interaction with Pocket Outlook, Windows Mobile 5.0 provides several new features to both native and managed developers: Contact Selection Dialog, Event Notifications, and Custom Properties.

    Mail Application Management
    Many applications can benefit by closely integrating messaging thereby providing users with a seamless experience between interacting directly with the application and interacting with SMS or e-mail messages related to the application. Windows Mobile 5.0 makes it easy for developers to provide this seamless experience with the introduction of several new messaging APIs. These new messaging APIs provide both native and managed developers with easy access to several features in the device messaging program. These features include displaying existing e-mail messages, using the messaging system's SMS and Email forms to compose new messages, in addition to the ability to control the currently active account in the messaging system. By using these APIs, developers can provide users with a smooth transition between the application and the device messaging program giving users a familiar and consistent messaging experience.