public class ImageManager
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
IMG_REQUEST |
| Constructor and Description |
|---|
ImageManager(android.app.Activity activity)
ImageManager's constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
isSelected()
Return a boolean that informs if the image has been selected or not.
|
void |
manageResult(int requestCode,
int resultCode,
android.content.Intent data,
android.widget.ImageView selectedImage)
Manage the subsequent activity returns.
|
void |
selectImage()
Start a second activity to allow the user to select an image.
|
void |
upload(BooleanConnector.OnEndConnectionListener result)
Send a request to the remote connector with the image to upload to the server.
|
public static final int IMG_REQUEST
public ImageManager(android.app.Activity activity)
activity - The activity.public boolean isSelected()
public void manageResult(int requestCode,
int resultCode,
android.content.Intent data,
android.widget.ImageView selectedImage)
requestCode - The activity request code.resultCode - The result code specified by the second activity.data - An Intent that carries the result data.selectedImage - The ImageView where the selected image will set.public void selectImage()
public void upload(@Nullable
BooleanConnector.OnEndConnectionListener result)
result - A listener that contains the result of the operation at the end of the
request.