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, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access