Placing phone calls from your application

In most mobile development projects, convenience is a central theme. User friendliness is measured by how quick a user can get to the information that he or she needs, or how quickly he or she can execute a desired action.

With this in mind, let's consider the following example. John might have created an application that manages a list of customers and their phone numbers. When viewing the details of a particular customer, the end user might wish to make a phone call to the customer. It wouldn't make much sense to have the user key in the phone number of the customer again as it is already onscreen. We could make it more convenient for the end user by placing a button called Make a phone call that automatically dials the onscreen number.

The Telephony library provided in the Microsoft.WindowsMobile namespace allows you to easily place a phone call directly from your application. Let's see how this can be done:

Using Microsoft.WindowsMobile.Telephony;
public object MakePhoneCall(string phoneNumber)
{
Phone _phone = new Phone();
_phone.Talk(phoneNumber);
}
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.78.174