public final class SimpleCamera extends Object
SimpleCamera.with(this).takePhoto();
| Modifier and Type | Field and Description |
|---|---|
protected static int |
REQ_CODE_PHOTO_GALLERY
Request code for Intent to launch photo gallery.
|
protected static int |
REQ_CODE_TAKE_PICTURE
Request code for Intent to take a photo.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
cameraExists()
Returns true if the device has a camera.
|
SimpleCamera |
photoGallery()
Launches the device's photo gallery activity.
|
SimpleCamera |
takePhoto()
Instructs the device to take a photo without saving it to a file.
|
SimpleCamera |
takePhoto(String filename)
Instructs the device to take a photo and save it to a file.
|
static SimpleCamera |
with(Context context)
Returns a singleton SimpleCamera instance bound to the given context.
|
static SimpleCamera |
with(View context)
Returns a singleton SimpleCamera instance bound to the given view's context.
|
protected static final int REQ_CODE_TAKE_PICTURE
protected static final int REQ_CODE_PHOTO_GALLERY
public static SimpleCamera with(Context context)
public static SimpleCamera with(View context)
public boolean cameraExists()
public SimpleCamera takePhoto()
public SimpleCamera takePhoto(String filename)
public SimpleCamera photoGallery()