Almost all Android handsets and tablets come with one or two cameras. You can use a camera to take still pictures by starting an activity in the built-in Camera application or use the Camera API.
This chapter shows how to use both approaches.
An Android application can call another application to use one or two features offered by the latter. For example, to send an email from your application, you can use the default Email application rather than writing your own app. In the case of taking a picture, the easiest way to do this is by using the Camera application. To activate Camera, use the following code.
int requestCode = ...;
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);