public
class
MtpDeviceInfo
extends Object
java.lang.Object | |
↳ | android.mtp.MtpDeviceInfo |
This class encapsulates information about an MTP device. This corresponds to the DeviceInfo Dataset described in section 5.1.1 of the MTP specification.
Public methods | |
---|---|
final
int[]
|
getEventsSupported()
Returns event code supported by the device. |
final
String
|
getManufacturer()
Returns the manufacturer's name for the MTP device |
final
String
|
getModel()
Returns the model name for the MTP device |
final
int[]
|
getOperationsSupported()
Returns operation code supported by the device. |
final
String
|
getSerialNumber()
Returns the unique serial number for the MTP device |
final
String
|
getVersion()
Returns the version string the MTP device |
boolean
|
isEventSupported(int code)
Returns if the given event is supported by the device or not. |
boolean
|
isOperationSupported(int code)
Returns if the given operation is supported by the device or not. |
Inherited methods | |
---|---|
From
class
java.lang.Object
|
int[] getEventsSupported ()
Returns event code supported by the device.
Returns | |
---|---|
int[] |
supported event code. Can be null if device does not provide the property. |
See also:
EVENT_UNDEFINED
EVENT_CANCEL_TRANSACTION
EVENT_OBJECT_ADDED
EVENT_OBJECT_REMOVED
EVENT_STORE_ADDED
EVENT_STORE_REMOVED
EVENT_DEVICE_PROP_CHANGED
EVENT_OBJECT_INFO_CHANGED
EVENT_DEVICE_INFO_CHANGED
EVENT_REQUEST_OBJECT_TRANSFER
EVENT_STORE_FULL
EVENT_DEVICE_RESET
EVENT_STORAGE_INFO_CHANGED
EVENT_CAPTURE_COMPLETE
EVENT_UNREPORTED_STATUS
EVENT_OBJECT_PROP_CHANGED
EVENT_OBJECT_PROP_DESC_CHANGED
EVENT_OBJECT_REFERENCES_CHANGED
String getManufacturer ()
Returns the manufacturer's name for the MTP device
Returns | |
---|---|
String |
the manufacturer name |
String getModel ()
Returns the model name for the MTP device
Returns | |
---|---|
String |
the model name |
int[] getOperationsSupported ()
Returns operation code supported by the device.
Returns | |
---|---|
int[] |
supported operation code. Can be null if device does not provide the property. |
See also:
OPERATION_GET_DEVICE_INFO
OPERATION_OPEN_SESSION
OPERATION_CLOSE_SESSION
OPERATION_GET_STORAGE_I_DS
OPERATION_GET_STORAGE_INFO
OPERATION_GET_NUM_OBJECTS
OPERATION_GET_OBJECT_HANDLES
OPERATION_GET_OBJECT_INFO
OPERATION_GET_OBJECT
OPERATION_GET_THUMB
OPERATION_DELETE_OBJECT
OPERATION_SEND_OBJECT_INFO
OPERATION_SEND_OBJECT
OPERATION_INITIATE_CAPTURE
OPERATION_FORMAT_STORE
OPERATION_RESET_DEVICE
OPERATION_SELF_TEST
OPERATION_SET_OBJECT_PROTECTION
OPERATION_POWER_DOWN
OPERATION_GET_DEVICE_PROP_DESC
OPERATION_GET_DEVICE_PROP_VALUE
OPERATION_SET_DEVICE_PROP_VALUE
OPERATION_RESET_DEVICE_PROP_VALUE
OPERATION_TERMINATE_OPEN_CAPTURE
OPERATION_MOVE_OBJECT
OPERATION_COPY_OBJECT
OPERATION_GET_PARTIAL_OBJECT
OPERATION_INITIATE_OPEN_CAPTURE
OPERATION_GET_OBJECT_PROPS_SUPPORTED
OPERATION_GET_OBJECT_PROP_DESC
OPERATION_GET_OBJECT_PROP_VALUE
OPERATION_SET_OBJECT_PROP_VALUE
OPERATION_GET_OBJECT_REFERENCES
OPERATION_SET_OBJECT_REFERENCES
OPERATION_SKIP
String getSerialNumber ()
Returns the unique serial number for the MTP device
Returns | |
---|---|
String |
the serial number |
String getVersion ()
Returns the version string the MTP device
Returns | |
---|---|
String |
the device version |
boolean isEventSupported (int code)
Returns if the given event is supported by the device or not.
Parameters | |
---|---|
code |
int :
Event code. |
Returns | |
---|---|
boolean |
If the given event is supported by the device or not. |
boolean isOperationSupported (int code)
Returns if the given operation is supported by the device or not.
Parameters | |
---|---|
code |
int :
Operation code. |
Returns | |
---|---|
boolean |
If the given operation is supported by the device or not. |