public final class GalleryHelper
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
PICK_IMAGE_REQUEST
The Constant PICK_IMAGE_REQUEST.
|
| Constructor and Description |
|---|
GalleryHelper(android.app.Activity activity)
Provides convenience access to device gallery.
|
| Modifier and Type | Method and Description |
|---|---|
void |
dispatchGalleryIntent()
Starts an activity to select a photo from the device's memory.
|
android.graphics.Bitmap |
getBitmap(int resultCode,
android.content.Intent data)
This method returns a bitmap of an image selected in the photo gallery.
|
java.io.File |
getFile(int resultCode,
android.content.Intent data)
This method returns the file of an image selected in the photo gallery.
|
java.lang.String |
getRealPathFromURI(android.net.Uri contentUri)
This method returns a path, given a content URI.
|
public static final int PICK_IMAGE_REQUEST
public GalleryHelper(android.app.Activity activity)
activity - the activitypublic void dispatchGalleryIntent()
public java.io.File getFile(int resultCode,
android.content.Intent data)
resultCode - Result code of a previous activitydata - Data returned from a previous activitypublic android.graphics.Bitmap getBitmap(int resultCode,
android.content.Intent data)
resultCode - Result code of a previous activitydata - Data returned from a previous activitypublic java.lang.String getRealPathFromURI(android.net.Uri contentUri)
contentUri - URI of some image