Interacting with the phone

In your day-to-day development you will often want to interact with the phone. This interaction may be as simple as dialing outbound calls through built-in intents, or it may involve intercepting calls to modify them in some way. In this section we are going to cover these basic tasks, and we will examine some of the phone number utilities Android provides for you out of the box. One of the more common things you will do with the Android telephony support doesn't involve the telephony APIs...

Introduction to multimedia and OpenCORE

Android Opencore Architecture

Since the foundation of Android's multimedia platform is PacketVideo's OpenCORE, in this section we will review OpenCORE's architecture and services. OpenCORE is a Java open source multimedia platform supporting the following Interfaces for third-party and hardware media codecs, input and output devices, and content policies Media playback, streaming, downloading, and progressive playback, including 3GPP, MPEG-4, AAC, and MP3 containers Video and image encoders and decoders, including MPEG-4,...

Performing Inter Process Communication

Android Aidl Diagram

Communication between application components in different processes is made possible in Android by a specific IPC approach. This, again, is necessary because each application on the platform runs in its own process, and processes are intentionally separated from one another. In order to pass messages and objects between processes, you have to use the Android IPC path. To begin exploring this path we are first going to build a small, focused sample application to examine the means to generate a...

Working with messaging SMS

SMS is a hugely popular and important means of communication for mobile devices. SMS is used to send simple text messages and small amounts of data. Android includes a built-in SMS application that allows users to view received SMS messages and send messages including replying to received messages . Along with the built-in user-facing support and the related ContentProvider for interacting with the built-in system, the SDK provides APIs for developers to be able to send and receive messages...

Mapping applications to processes

Android applications each run in a single Linux process. Android relies on Linux for process management, and the application itself runs in an instance of the Dalvik virtual machine. The OS may need to unload, or even kill, an application from time to time to accommodate resource allocation demands. There is a hierarchy or sequence the system uses to select the victim of a resource shortage. In general, the rules are as follows Visible, running activities have top priority. Visible, nonrunning...

Listening in with broadcast receivers

Another way to use an Intent involves sending a broadcast to any interested receiver. There are many reasons an application may want to broadcast an event for example, when an incoming phone call or text message is received. In this section we will take a look at how events are broadcast and how they are captured using a BroadcastReceiver. Here we will continue working through the WeatherReporter sample application we began in the previous section. One of the most important parts of the...