From the course: Android Development: Understanding Intents
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Capturing a picture - Android Tutorial
From the course: Android Development: Understanding Intents
Capturing a picture
- [Instructor] So far in the course, we've seen a few examples where we started an intent with the express purpose of kicking off a process that we didn't expect to get any data back from. So for example, we saw how to start up the camera for the user, and how to display a web page, and how to start activities in our own app, but those examples were one way operations. However, there are fairly common scenarios where you want to start off another process with the purpose of retrieving some data back from that process. And a good example of this, is using the system camera application to take a picture and then return that picture back to your app. So that's what we're going to see how to do in this example. So here in the code for the media activity.javaclass I've scrolled down to my capture pic button handler and I'm going to write some code for the capture photo button click case. So the action I want to use, in this case, is media store and it's going to be action image capture…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.