Companies. Click here for terms of use.

Key Skills & Concepts

• Using Intents

• Creating code that interacts with the phone hardware

• Learning the difference between dialing and calling

The chapters up to this point have introduced you to the basics of Android programming.

You have examined the outline of an Android application and installed your first applications to the Android server. You have learned how to use Views and setContentView(), as well as how to create a UI in XML. These skills have helped you to create a static application. What you have not done yet is use the application interface to interact with the hardware that the platform was created for—the cell phone.

You should not lose sight of the fact that the platform for which Android was created is, in essence, still a cell phone. The underlying hardware for the devices that Android will run on is designed for the purpose of person-to-person communication. If you strip away all the bells and whistles that the Android SDK is capable of adding to the cell phone, it must still be able to send and receive phone calls. For this reason, this chapter focuses on the code that enables you to interact with the phone hardware.

By the end of this chapter, you should have the skills needed to interact with some of the basic functions of the phone. You will be able to work with the dialer to send and receive calls. These tools and skills will be your keys to creating useful applications on this flexible platform.

You are reading this book because you intend to design applications that run on a cell phone, so it stands to reason that you should learn how Android allows for interaction with the phone hardware—in particular, the process that enables the phone to send and receive calls.

When we think of a cell phone, a few basic functions come to mind. The first, and most obvious, of which is the ability to send and receive phone calls. This is inarguably the quintessential function of a cell phone. There are a few peripheral features that make the cell phone easier to use, such as the ability to keep and manage contacts and the ability to store and review missed calls. As you'll read in this chapter, you can access and manipulate the code for all of these functions.

The first phone function that you will look at in this chapter is the sending ofcalls. You will create an application, using an Intent, that controls the phone dialer and causes it to place a call to a number. As the chapter progresses, you will expand on this application and add some bells and whistles to it.

0 0

Post a comment