| DIY Windows Mobile dialer |
Jul. 29, 2008
An enjoyable article on our sister website www.devsource.com takes readers through creating their first customized phone application for Windows Mobile. Jeff Cogswell's "Creating a Custom Phone App on Windows Mobile" is the first of a series covering the operating system's telephony API (TAPI), the author says.
Cogswell (pictured, above) writes that he recently acquired a Windows Mobile phone and, while he loves the device, he did not particularly care for its phone dialing application. "Now it's just software running under Windows Mobile, which led me to explore the Windows Mobile API to see what support it has for phone applications," he notes, adding, "Could I write my own custom phone application that I like better?"
The quest led him to delve into the innards of Windows Mobile 6.0 using Visual Studio 2008, including the development environment's enhanced device emulator. "I can't guarantee, but I suspect [my code] will work under Visual Studio 2005 and Windows Mobile 5.0," he adds.
 Visual Studio 2008 includes this wizard for creating Windows Mobile applications (Click to enlarge) In the article, Cogwell demonstrates how simple it is to add calling capabilities to any application, using a class called Phone that lives in the Microsoft.Windows.Mobile.Telephony namespace. Using a wizard included with Visual Studio 2008 (shown above), he first creates a form that resembles a Windows Mobile phone, adds the Telephony namespace to it, then adds basic handler code -- initially coded to dial a specific phone number, for demonstration purposes.
 Running in an emulator, the sample application can't actually dial out (Click to enlarge) Visual Studio 2008 is then used to deploy this application to the Windows Mobile 6 Professional Emulator, with results as shown above. The emulator cannot actually dial out, so the next step is deploying the app to an actual device. Do this, click on the application's button to dial the demonstration number, and you'll discover that it invokes the phone dialing application you were trying to replace in the first place, Cogswell laments. That's because the Phone class doesn't have any low-level phone capabilities, he notes.
In the remainder of the article, therefore, Cogwell delves more deeply into Windows Mobile's TAPI, ultimately creating the above application. This start program is capable of dialing any number entered by the user, and of hanging up the phone, without involing any other applications.
Noting that the TAPI is huge and the article couldn't possibly have covered it all, Cogswell says his code isn't exactly "ideal," and just touches on the basics. TAPI provides control over a multitude of features, such as call waiting, call logs, ring volume, and more.
According to Cogswell, the next article in the series will cover adding numeric buttons to the application. These buttons will allow filling the application's text box with digits before a call, and will also allow tones to be generated during a call, he writes.
To read "Creating a Custom Phone App on Windows Mobile," part I, see the DevSource website, here.
Related stories:
(Click here for further information)
|
|
|
|