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 ...
Get Android Programming for Beginners 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.