19Camera I: Viewfinder

When documenting a crime, it helps to have photographic evidence. In the next two chapters, you will add the ability to take a photo of a crime using the camera API.

The camera API, while powerful, is not succinct or simple. You will be typing in a lot of code and, at times, cage-fighting with concepts that seem like overkill. You may think, I just need to snap a quick photo. Isn’t there a standard interface for this?

There is. You can interact with the camera via an implicit intent. Most Android devices have a camera app installed, and the camera app listens for an intent created with MediaStore.ACTION_IMAGE_CAPTURE. You will learn how to work with implicit intents in Chapter 21.

Unfortunately, as of this writing, ...

Get Android Programming: The Big Nerd Ranch Guide 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.