|By Derek Ferguson, Jon Box||
|May 10, 2005 10:00 AM EDT||
There has never been an operating system release more important to .NET developers than the release of Windows Mobile Version 5.0. With this release, Microsoft is poised to take your productivity in writing mobile applications higher than it has ever gone before. Rich multimedia capabilities, integrated messaging, and world-class telephony support are just a few of the benefits you will realize when you develop applications for the Windows Mobile 5.0 platform.
From the perspective of the .NET software developer, perhaps the most important piece of Windows Mobile 5.0 is its brand new Managed API. All of the code for this new API is found in the Microsoft.WindowsMobile namespace. You can access this API from Visual Studio by adding references to the following assemblies:
TelephonyOf the four Windows Mobile-based devices I [Derek] have owned over the past few years, three of them have been telephony-enabled devices. The first two of these were Pocket PC Phone Edition devices, so named because they were essentially Pocket PCs that just happened to support making and receiving telephone calls.
My most recent acquisition is a Windows Mobile 2003 Second Edition-based Smartphone. The Smartphone is an amazingly capable device that allows me to send and receive MSN Messenger messages, take pictures, and run software written using the .NET Compact Framework, in addition to the traditional telephony functions of placing and receiving telephone calls.
Before Windows Mobile 5.0, however, Windows Mobile Software for Pocket PC Phone Edition or Smartphone did not support direct access to telephony functionality via a managed API. So prior to Windows Mobile 5.0, if one wanted to create a .NET Compact Framework application that, for example, dialed a given telephone number, one would typically have had to access a native API for this purpose via .NET's p/Invoke functionality.
Windows Mobile 5.0 addresses this by providing a namespace called Microsoft.WindowsMobile.Telephony as a part of its base functionality. At the time of writing, this namespace consists of a single class called Phone, which exposes a single method, called Talk. Talk takes a String parameter representing the telephone number to be dialed, plus an optional Boolean parameter specifying whether or not the user should be prompted prior to dialing.
For example, the following line of C# code will dial the number for operator assistance in most major U.S. cities. Prior to dialing, however, a confirmation dialog will be displayed to the user.
new Phone().Talk("555-1212", true);
Outlook MobileThe ability to store information about contacts and to communicate with them is central to the functionality of both major device types (Smartphones and Personal Digital Assistants - PDAs) currently targeted by the .NET Compact Framework. On the Windows desktop, Microsoft Outlook is the application of choice for storing contact information and for communicating via e-mail. Under Windows Mobile, this functionality is performed by Outlook Mobile, with added functionality for communication via the Short Message Service (SMS), a kind of instant messaging tailor-made for use with mobile devices.
Prior to Windows Mobile 5.0, there was no managed interface for Outlook Mobile. To be sure, alternative approaches for accessing contacts under Windows Mobile have been developed. Developers could native code, p/Invoke, or - under Visual Studio 2005 - use COM Interop to tap into the rich messaging and contact management functionality provided by Outlook Mobile. Third-party vendors (see Resources at the end of this article) have also developed and sold Outlook Mobile access libraries for the .NET Compact Framework.
With the release of Windows Mobile 5.0, developers for the first time have a managed API baked directly into the operating system to facilitate all Personal Information Management (PIM) functionality available in the Windows Mobile operating system.
The Pocket Outlook Object ModelThe core managed APIs for interacting with Outlook Mobile on Windows Mobile 5.0 are all contained in the Microsoft.WindowsMobile.PocketOutlook namespace (the name is a throwback to the old name for Outlook Mobile, Pocket Outlook). In general, there is one unique class for dealing with each kind of entity in Outlook Mobile.
To briefly summarize the kinds of classes in as few words as possible, consider the path that a message will typically take from Outlook Mobile to a recipient aw well as its path in the opposite direction. The trip begins (or ends) with either an e-mail or an SMS account, because these are the two protocols supported by Outlook Mobile. For this reason, there are EmailAccount and SmsAccount classes in the PocketOutlook namespace.
To create an actual message, there are EmailMessage and SmsMessage classes, as well as classes for working with such messages' associated entities. For example, there are classes for things such as recipients and attachments. A brief example of sending an e-mail using some of these classes is shown in Listing 1.
Listing 1 begins by creating an Outlook Session. This is a central class in working with Outlook Mobile's managed API, and you will generally always instantiate this class whenever you work with Outlook Mobile.
We then instantiate an instance of EmailMessage to represent the message we wish to send, and an instance of Recipient to represent the person to whom we wish to send our message. We set the text of the message's body, associate the recipient with the message, then use the account named "PersonalAccount" (which we got from the Outlook Session) to send our e-mail.
Besides messages, Outlook Mobile also facilitates the tracking of appointments and tasks. There are classes for both of these things, as well as a host of supporting classes for details such as their recurrence schedules.
Finally, many of the classes described above also have collection classes for dealing with their instances as a group. TaskCollection, ContactCollection, and Appointment-Collection would be good examples of such classes.
Intercepting MessagesA recent client was very concerned about their potential loss of intellectual property if one of their organization's devices were ever lost or stolen. They wanted to be able to completely wipe (perform a "cold reset" upon) a device that had gone beyond their physical control simply by sending it an SMS message with a special secret code in its body.
The class that allows a developer to build this kind of functionality in Windows Mobile 5.0 is known as MessageInterceptor and lives in the Microsoft.WindowsMobile.PocketOutlook.MessageInterception namespace. This namespace is all about writing code that waits to receive a message, and then performing some kind of work.
The workflow to achieve this is fairly simple. First, one must instantiate a MessageInterceptor object. There are two main points of interest on this object. First, its MessageCondition property allows a developer to specify the kind of message to which such an object should respond. The interceptor can be set to respond to a message with a Body, Sender, or Subject that matches - or explicitly doesn't match - a given value.
The other interesting feature of this class is its EnableApplication-Launcher method. By calling this method, you can register your application to be launched when a specified message is received. This allows you to intercept messages without having to keep your applications running in the background.
Managed Configuration ManagerCarriers and corporate support groups will want to interact with the Configuration Manager in order to set up a device with different characteristics. The potential areas of configuration include user settings and device settings like connectivity parameters, security, and the ability to uninstall an application. These settings are contained in XML files that need to be passed into the Configuration Manager. The explanation of this topic would require more than an article, so we'll just point out that the ConfigurationManager class (in the Microsoft.WindowsMobile.ConfigurationManager namespace) is your managed entry point to this functionality.
Using Windows Mobile 5.0 UI in My ApplicationsAs we've mentioned earlier, Window Mobile 5.0 has the first managed API for dealing with Outlook Mobile. This API is extended into the UI tier of Windows Mobile 5.0, and joined by some new dialogs for enhanced multimedia functionality. These APIs are found in System.WindowsMobile.Forms, and include three new dialogs: ChooseContactDialog, SelectPictureDialog, and Camera-CaptureDialog.
To set the stage for this discussion, let's assume that you manage a group of volunteer authors while on the road traveling between your client's city and your home, and it's time to start planning the next issue of your magazine. (This should sound familiar to Derek!) You open up your application on your Windows Mobile 5.0-based device, go to the Start New Issue screen, and start entering data.
One of the enhancements that consumers will notice immediately with Window Mobile 5.0 is that of Outlook Mobile. With the managed interface to this functionality, developers will obviously build PIM and business applications that extend the notion of Contacts. Also, since this application stores the authors as Contacts, we'll use the ChooseContactDialog class to select the authors for this issue. The ChooseContactDialog class does several different things with Contacts, so we'll set up the properties to only select the Contact and then call ShowDialog to get the window started. (See Listing 2 and Figure 1.)
Later, the magazine editor might want to send the author's picture to the printing company. As you'll find out, Windows Mobile 5.0 has an application for selecting and viewing images - and we can use that too. The SelectPictureDialog class provides intuitive functionality like setting the directory to look in, controlling the folder navigation, the title to have on the selection screen, and the chosen image. (See Listing 3.)
Finally, let's say that the magazine editor is at a conference and recruits a new author. The editor knows that at some point that we'll need a headshot. Instead of having to ask later, the editor decides to take advantage of our application and use the integrated camera. By building a screen that calls the CameraCaptureDialog class the application will interact with the device's built-in camera and provides an image file of the author. This is a huge improvement over having to P/Invoke into the OEM's camera API DLL, if they provided one.
Filling in the Gaps of .NET Compact Framework 1.0Derek and Jon have both written and talked about the missing areas in the .NET Compact Framework. These gaps became the subject of many whitepapers on the MSDN Mobility site. The Microsoft.WindowsMobile.Status solves the majority of these by providing several classes that manage access to system properties. Thus, a developer can now easily retrieve the current ActiveSync status, the display orientation, power state and battery strength, phone information, calendar and task information, messaging and connectivity information, and more. The vastness of the list is impressive. Throw in a few enumerations, and it's as easy as:
If SystemState.ActiveSyncStatus =
'Wait for new files
Another way to interact with these properties is to have the SystemState class deliver a notification about a monitored property. For example:
Dim oStatus As New SystemState(System Property.PhoneGprsCoverage)
AddHandler(oStatus.Changed, addressof me.GprsCoverageChange)
The SystemState class also exposes an EnableApplicationLauncher method similar to that exposed by the MessageInterceptor class described above. The difference is, however, that the events that can trigger an application's launch using this method are much more diverse than simply the receipt of a given e-mail or SMS message. This is functionality that many desktop Windows developers would envy!
There are more topics for discussion in the Status namespace. However with these three options, I believe that the SystemState class will be of great interest to those of us who have already been working with the .NET Compact Framework.
ConclusionAs you have seen, Windows Mobile 5.0 will deliver a development experience that is superior to anything available on competing mobility platforms. The availability of managed APIs and a development tool as powerful as Visual Studio 2005 represents the highest level of developer productivity currently available. The integration of multimedia facilities, such as the CameraCaptureDialog described above, will facilitate the creation of rich multimedia applications. And finally, the wide range of application and customization experiences that Windows Mobile 5.0 will make available will allow Microsoft partners and customers to differentiate their offerings in ways previously unimagined. Stay tuned to the MSDN Mobile and Embedded Developer Center for information on the tools to build Windows Mobile 2005 applications.
ResourcesOutlook Mobile-related Links
For those of you who need to support Outlook Mobile integration using .NET Compact Framework 2.0, but prior to Windows Mobile 5.0, check out Steven Pratschner's blog for a sample using COM Interop to achieve this.
For the many of you who will need to support Outlook Mobile integration prior to .NET Compact Framework 2.0, check out this product.
SYS-CON Events announced today that HPM Networks will exhibit at the 17th International Cloud Expo®, which will take place on November 3–5, 2015, at the Santa Clara Convention Center in Santa Clara, CA. For 20 years, HPM Networks has been integrating technology solutions that solve complex business challenges. HPM Networks has designed solutions for both SMB and enterprise customers throughout the San Francisco Bay Area.
Aug. 3, 2015 06:45 PM EDT Reads: 557
For IoT to grow as quickly as analyst firms’ project, a lot is going to fall on developers to quickly bring applications to market. But the lack of a standard development platform threatens to slow growth and make application development more time consuming and costly, much like we’ve seen in the mobile space. In his session at @ThingsExpo, Mike Weiner, Product Manager of the Omega DevCloud with KORE Telematics Inc., discussed the evolving requirements for developers as IoT matures and conducted a live demonstration of how quickly application development can happen when the need to comply wit...
Aug. 2, 2015 11:15 AM EDT Reads: 374
The Internet of Everything (IoE) brings together people, process, data and things to make networked connections more relevant and valuable than ever before – transforming information into knowledge and knowledge into wisdom. IoE creates new capabilities, richer experiences, and unprecedented opportunities to improve business and government operations, decision making and mission support capabilities.
Aug. 1, 2015 10:00 AM EDT Reads: 351
Explosive growth in connected devices. Enormous amounts of data for collection and analysis. Critical use of data for split-second decision making and actionable information. All three are factors in making the Internet of Things a reality. Yet, any one factor would have an IT organization pondering its infrastructure strategy. How should your organization enhance its IT framework to enable an Internet of Things implementation? In his session at @ThingsExpo, James Kirkland, Red Hat's Chief Architect for the Internet of Things and Intelligent Systems, described how to revolutionize your archit...
Jul. 30, 2015 07:30 PM EDT Reads: 1,437
MuleSoft has announced the findings of its 2015 Connectivity Benchmark Report on the adoption and business impact of APIs. The findings suggest traditional businesses are quickly evolving into "composable enterprises" built out of hundreds of connected software services, applications and devices. Most are embracing the Internet of Things (IoT) and microservices technologies like Docker. A majority are integrating wearables, like smart watches, and more than half plan to generate revenue with APIs within the next year.
Jul. 30, 2015 02:30 PM EDT Reads: 163
Growth hacking is common for startups to make unheard-of progress in building their business. Career Hacks can help Geek Girls and those who support them (yes, that's you too, Dad!) to excel in this typically male-dominated world. Get ready to learn the facts: Is there a bias against women in the tech / developer communities? Why are women 50% of the workforce, but hold only 24% of the STEM or IT positions? Some beginnings of what to do about it! In her Opening Keynote at 16th Cloud Expo, Sandy Carter, IBM General Manager Cloud Ecosystem and Developers, and a Social Business Evangelist, d...
Jul. 30, 2015 12:00 PM EDT Reads: 2,096
In his keynote at 16th Cloud Expo, Rodney Rogers, CEO of Virtustream, discussed the evolution of the company from inception to its recent acquisition by EMC – including personal insights, lessons learned (and some WTF moments) along the way. Learn how Virtustream’s unique approach of combining the economics and elasticity of the consumer cloud model with proper performance, application automation and security into a platform became a breakout success with enterprise customers and a natural fit for the EMC Federation.
Jul. 30, 2015 09:00 AM EDT Reads: 2,183
The Internet of Things is not only adding billions of sensors and billions of terabytes to the Internet. It is also forcing a fundamental change in the way we envision Information Technology. For the first time, more data is being created by devices at the edge of the Internet rather than from centralized systems. What does this mean for today's IT professional? In this Power Panel at @ThingsExpo, moderated by Conference Chair Roger Strukhoff, panelists addressed this very serious issue of profound change in the industry.
Jul. 29, 2015 03:00 PM EDT Reads: 1,311
Discussions about cloud computing are evolving into discussions about enterprise IT in general. As enterprises increasingly migrate toward their own unique clouds, new issues such as the use of containers and microservices emerge to keep things interesting. In this Power Panel at 16th Cloud Expo, moderated by Conference Chair Roger Strukhoff, panelists addressed the state of cloud computing today, and what enterprise IT professionals need to know about how the latest topics and trends affect their organization.
Jul. 29, 2015 02:00 PM EDT Reads: 1,219
It is one thing to build single industrial IoT applications, but what will it take to build the Smart Cities and truly society-changing applications of the future? The technology won’t be the problem, it will be the number of parties that need to work together and be aligned in their motivation to succeed. In his session at @ThingsExpo, Jason Mondanaro, Director, Product Management at Metanga, discussed how you can plan to cooperate, partner, and form lasting all-star teams to change the world and it starts with business models and monetization strategies.
Jul. 28, 2015 04:30 PM EDT Reads: 1,781
Converging digital disruptions is creating a major sea change - Cisco calls this the Internet of Everything (IoE). IoE is the network connection of People, Process, Data and Things, fueled by Cloud, Mobile, Social, Analytics and Security, and it represents a $19Trillion value-at-stake over the next 10 years. In her keynote at @ThingsExpo, Manjula Talreja, VP of Cisco Consulting Services, discussed IoE and the enormous opportunities it provides to public and private firms alike. She will share what businesses must do to thrive in the IoE economy, citing examples from several industry sectors.
Jul. 28, 2015 11:00 AM EDT Reads: 2,056
There will be 150 billion connected devices by 2020. New digital businesses have already disrupted value chains across every industry. APIs are at the center of the digital business. You need to understand what assets you have that can be exposed digitally, what their digital value chain is, and how to create an effective business model around that value chain to compete in this economy. No enterprise can be complacent and not engage in the digital economy. Learn how to be the disruptor and not the disruptee.
Jul. 27, 2015 10:00 AM EDT Reads: 2,057
Akana has released Envision, an enhanced API analytics platform that helps enterprises mine critical insights across their digital eco-systems, understand their customers and partners and offer value-added personalized services. “In today’s digital economy, data-driven insights are proving to be a key differentiator for businesses. Understanding the data that is being tunneled through their APIs and how it can be used to optimize their business and operations is of paramount importance,” said Alistair Farquharson, CTO of Akana.
Jul. 27, 2015 09:00 AM EDT Reads: 340
Business as usual for IT is evolving into a "Make or Buy" decision on a service-by-service conversation with input from the LOBs. How does your organization move forward with cloud? In his general session at 16th Cloud Expo, Paul Maravei, Regional Sales Manager, Hybrid Cloud and Managed Services at Cisco, discusses how Cisco and its partners offer a market-leading portfolio and ecosystem of cloud infrastructure and application services that allow you to uniquely and securely combine cloud business applications and services across multiple cloud delivery models.
Jul. 27, 2015 08:00 AM EDT Reads: 1,917
The enterprise market will drive IoT device adoption over the next five years. In his session at @ThingsExpo, John Greenough, an analyst at BI Intelligence, division of Business Insider, analyzed how companies will adopt IoT products and the associated cost of adopting those products. John Greenough is the lead analyst covering the Internet of Things for BI Intelligence- Business Insider’s paid research service. Numerous IoT companies have cited his analysis of the IoT. Prior to joining BI Intelligence, he worked analyzing bank technology for Corporate Insight and The Clearing House Payment...
Jul. 26, 2015 09:00 PM EDT Reads: 1,600
"Optimal Design is a technology integration and product development firm that specializes in connecting devices to the cloud," stated Joe Wascow, Co-Founder & CMO of Optimal Design, in this SYS-CON.tv interview at @ThingsExpo, held June 9-11, 2015, at the Javits Center in New York City.
Jul. 25, 2015 02:00 PM EDT Reads: 408
SYS-CON Events announced today that CommVault has been named “Bronze Sponsor” of SYS-CON's 17th International Cloud Expo®, which will take place on November 3–5, 2015, at the Santa Clara Convention Center in Santa Clara, CA. A singular vision – a belief in a better way to address current and future data management needs – guides CommVault in the development of Singular Information Management® solutions for high-performance data protection, universal availability and simplified management of data on complex storage networks. CommVault's exclusive single-platform architecture gives companies unp...
Jul. 25, 2015 01:00 PM EDT Reads: 1,982
Electric Cloud and Arynga have announced a product integration partnership that will bring Continuous Delivery solutions to the automotive Internet-of-Things (IoT) market. The joint solution will help automotive manufacturers, OEMs and system integrators adopt DevOps automation and Continuous Delivery practices that reduce software build and release cycle times within the complex and specific parameters of embedded and IoT software systems.
Jul. 25, 2015 12:15 PM EDT Reads: 490
"ciqada is a combined platform of hardware modules and server products that lets people take their existing devices or new devices and lets them be accessible over the Internet for their users," noted Geoff Engelstein of ciqada, a division of Mars International, in this SYS-CON.tv interview at @ThingsExpo, held June 9-11, 2015, at the Javits Center in New York City.
Jul. 25, 2015 12:00 PM EDT Reads: 1,567
Internet of Things is moving from being a hype to a reality. Experts estimate that internet connected cars will grow to 152 million, while over 100 million internet connected wireless light bulbs and lamps will be operational by 2020. These and many other intriguing statistics highlight the importance of Internet powered devices and how market penetration is going to multiply many times over in the next few years.
Jul. 25, 2015 09:00 AM EDT Reads: 1,510