Interface Intents¶
public interface Intents
Field Summary¶
Modifier and Type | Field and Description |
---|---|
static String |
ACTION_IMAGE_CAPTURE
Intent action that can be sent to have the Iristick camera application capture an image
and return it.
|
static String |
ACTION_SCAN_BARCODE
Intent action that can be sent to capture a barcode and return the decoded data.
|
static String |
ACTION_VIDEO_CAPTURE
Intent action that can be sent to have the camera application capture a video and
return it.
|
static String |
ACTION_VIEW
Intent action that can be sent to show a piece of data to the user.
|
static String |
EXTRA_BARCODE_FORMAT
A
String extra containing the decoded barcode format. |
static String |
EXTRA_BARCODE_RESULT
A
String extra containing the decoded barcode. |
static String |
EXTRA_BARCODE_SCAN_FORMATS
A
String extra with a comma-separated list of barcode
formats to detect. |
static String |
EXTRA_DURATION_LIMIT
Specify the maximum allowed recording duration in seconds.
|
static String |
EXTRA_EXIT_ON_ZOOM_OUT
A
boolean extra indicating whether the intent
should be closed when the user asks to zoom out while the view is already completely
zoomed out. |
static String |
EXTRA_OUTPUT
The name of the Intent-extra used to indicate a content resolver Uri to be used to
store the requested image or video.
|
static String |
EXTRA_SIZE_LIMIT
Deprecated.
There is no guarantee that the final size of the recorded video will not be
greater than this limit. Therefore, use of this extra feature is discouraged.
|
static String |
EXTRA_VIDEO_QUALITY
The name of the Intent-extra used to control the quality of a recorded video.
|
static int |
RESULT_CANCELLED
Activity result code: operation canceled.
|
static int |
RESULT_OK
Activity result code: operation succeeded.
|
static int |
RESULT_UNKNOWN_ERROR
Activity result code: an unknown error has occurred.
|
Field Detail¶
ACTION_IMAGE_CAPTURE¶
static final String ACTION_IMAGE_CAPTURE
Intent action that can be sent to have the Iristick camera application capture an image and return it.
The caller may pass an extra EXTRA_OUTPUT
to control where this image will be
written. If the EXTRA_OUTPUT
is not present, then a small sized image is returned
as a Bitmap object in the extra field. This is useful for applications that only need a
small image. If the EXTRA_OUTPUT
is present, then the full-sized image will be
written to the Uri value of EXTRA_OUTPUT
.
This Uri can also be supplied through
setClipData(ClipData)
.
- See Also:
EXTRA_OUTPUT
ACTION_VIDEO_CAPTURE¶
static final String ACTION_VIDEO_CAPTURE
Intent action that can be sent to have the camera application capture a video and return it.
The caller may pass in an extra EXTRA_VIDEO_QUALITY
to control the video quality.
The caller may pass in an extra EXTRA_OUTPUT
to control
where the video is written. If EXTRA_OUTPUT
is not present the video will be
written to the standard location for videos, and the Uri of that location will be
returned in the data field of the Uri.
This uri can also be supplied through
setClipData(ClipData)
.
ACTION_SCAN_BARCODE¶
static final String ACTION_SCAN_BARCODE
Intent action that can be sent to capture a barcode and return the decoded data.
The caller may pass in the following extras to control the decoding process:
The result will contain extras EXTRA_BARCODE_RESULT
and
EXTRA_BARCODE_FORMAT
.
ACTION_VIEW¶
static final String ACTION_VIEW
Intent action that can be sent to show a piece of data to the user.
The caller must pass the URI to the data to Intent.setData(android.net.Uri)
.
The mime type and/or path extension of the URI determines how the data is shown to the user.
Supported mime types/extensions are:
Extension | MIME type |
---|---|
.bmp | image/bmp |
.bmp | image/x-windows-bmp |
.gif | image/gif |
.jpeg | image/jpeg |
.jpg | image/jpeg |
.jpeg | image/pjpeg |
.jpg | image/pjpeg |
.png | image/png |
.webp | image/webp |
The caller may pass in an extra EXIT_ON_ZOOM_OUT
to control whether the intent
should be closed and control returned to the caller when the user tries to zoom out while
the view is already completely zoomed out. By default, the user must explicitely close the
viewer by pressing on the back button, swiping down on the touchpad or saying "go backwards".
- See Also:
EXTRA_EXIT_ON_ZOOM_OUT
EXTRA_OUTPUT¶
static final String EXTRA_OUTPUT
EXTRA_VIDEO_QUALITY¶
static final String EXTRA_VIDEO_QUALITY
EXTRA_SIZE_LIMIT¶
@Deprecated static final String EXTRA_SIZE_LIMIT
EXTRA_DURATION_LIMIT¶
static final String EXTRA_DURATION_LIMIT
EXTRA_BARCODE_SCAN_FORMATS¶
static final String EXTRA_BARCODE_SCAN_FORMATS
String extra
with a comma-separated list of barcode
formats to detect.
See CaptureRequest.POSTPROCESS_BARCODE_FORMATS
for a list of possible values. For example, to scan only for EAN-8, EAN-13 and QR-codes,
set this extra to "EAN_8,EAN_13,QR_CODE"
.
Unknown formats will be silently ignored, as well as formats that are unavailable on the connected headset. If this extra is not provided, a subset of the most common formats is selected.
EXTRA_BARCODE_RESULT¶
static final String EXTRA_BARCODE_RESULT
String extra
containing the decoded barcode.EXTRA_BARCODE_FORMAT¶
static final String EXTRA_BARCODE_FORMAT
String extra
containing the decoded barcode format.EXTRA_EXIT_ON_ZOOM_OUT¶
static final String EXTRA_EXIT_ON_ZOOM_OUT
boolean extra
indicating whether the intent
should be closed when the user asks to zoom out while the view is already completely
zoomed out. This only concerns the "zoom out" voice command; zooming out with the touchpad
never closes the intent.RESULT_OK¶
static final int RESULT_OK
RESULT_CANCELLED¶
static final int RESULT_CANCELLED
RESULT_UNKNOWN_ERROR¶
static final int RESULT_UNKNOWN_ERROR