17Audio, Video, and Using the Camera

PLAYING AUDIO AND VIDEO, AND USING THE CAMERA

Smartphones and tablets have become so popular that for many people they have entirely replaced all other portable electronics—including cameras, music players, and audio recorders. As a result Android’s media APIs, which allow us to build apps that offer a rich audio, video, and camera experiences, have become increasingly powerful and important.

This chapter introduces you to the Android APIs for controlling audio and video recording and playback, controlling the audio focus of the device, and reacting appropriately when other applications take focus or the output channel is changed (for example, when headphones are unplugged).

You also learn how to use the Media Session APIs to communicate information about your media playback to the system and to ...

Get Professional Android, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.