O'Reilly logo

Android Programming for Beginners by John Horton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Where it's snap – coding the capture Fragment

Now we can add the capture functionality to the Where it's snap app. We will implement the functionality of capturing an image from the camera as well as allow the user to add a title and tags for the image. We will not, however, add any functionality to save any of this data, as you will first want to learn about databases before we do.

In preparation to save the data, however, we will meet the Android Uri and File classes, which allow us to identify and locate the photos that the user captures.

The completed app, as it is at the end of this chapter, can be found in Chapter 22/Where Its Snap 2.

We will first add a layout that CaptureFragment will use, and we will then add some code, some of which should ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required