Join Michael Lehman for an in-depth discussion in this video Solution: Take a selfie when you win, part of Simple Android Development Tools.
…All right, so the solution for the challenge in the…Basic4android chapter, here, is taking a selfie when you win.…So, the key is figuring out where to put the code.…In this case we're going to the put the code right here inside process button.…So you see that we look and see if the state is zero or one.…And when the count is six we put in the You Win label and make them visible.…And now we need to take a picture.…So the way you take a picture is that you declare an Intent.…
Remember, I mentioned earlier that you can access other…features of the Android operating system because the system is…set up so that there are Intents, things like, take…a picture, or send a message, or send an email.…And you simply have to declare an Intent, initialize it with the…appropriate Intents string, in this case…it's android.media.action.IMAGE_CAPTURE, and then start it.…So now we're just going to go ahead and just…start it when the activity is ready to go.…This is something we can only do on the device…so we're going to go ahead and do it on our device.…
- Understanding the elements of an Android app, such as controls, sensors, effectors, and storage
- Exploring MIT App Inventor 2
- Getting started with Basic4android
- Building simple apps
- Testing apps on Android emulators and devices
- Sharing apps
- Creating hybrid apps with Appy Pie, Make Me Droid, and AppMakr
Skill Level Beginner
1. Overview of Android Development
2. MIT App Inventor 2
4. Web-App-Creation Tools
Next steps1m 43s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.