Using the Camera
Many Android devices have a camera, which can be used independently by the user or integrated into an app. You can integrate it into an app by calling the camera API to start the camera so that the user can take a picture using the camera app provided by Android and then return the picture to the app. You can also do it in a more sophisticated manner in which the camera’s API, and thus, functionality, is integrated right in the app. The former approach is similar to the way the phone functionality was used in the previous section. The latter is much more sophisticated and requires creating an activity and layout designed to provide the camera functionality desired in the app. This approach is beyond the scope of this book.
Get Learning Mobile App Development: A Hands-on Guide to Building Apps with iOS and Android 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.