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 | |
|---|---|
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_UNDEFINEDEVENT_CANCEL_TRANSACTIONEVENT_OBJECT_ADDEDEVENT_OBJECT_REMOVEDEVENT_STORE_ADDEDEVENT_STORE_REMOVEDEVENT_DEVICE_PROP_CHANGEDEVENT_OBJECT_INFO_CHANGEDEVENT_DEVICE_INFO_CHANGEDEVENT_REQUEST_OBJECT_TRANSFEREVENT_STORE_FULLEVENT_DEVICE_RESETEVENT_STORAGE_INFO_CHANGEDEVENT_CAPTURE_COMPLETEEVENT_UNREPORTED_STATUSEVENT_OBJECT_PROP_CHANGEDEVENT_OBJECT_PROP_DESC_CHANGEDEVENT_OBJECT_REFERENCES_CHANGEDString 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_INFOOPERATION_OPEN_SESSIONOPERATION_CLOSE_SESSIONOPERATION_GET_STORAGE_I_DSOPERATION_GET_STORAGE_INFOOPERATION_GET_NUM_OBJECTSOPERATION_GET_OBJECT_HANDLESOPERATION_GET_OBJECT_INFOOPERATION_GET_OBJECTOPERATION_GET_THUMBOPERATION_DELETE_OBJECTOPERATION_SEND_OBJECT_INFOOPERATION_SEND_OBJECTOPERATION_INITIATE_CAPTUREOPERATION_FORMAT_STOREOPERATION_RESET_DEVICEOPERATION_SELF_TESTOPERATION_SET_OBJECT_PROTECTIONOPERATION_POWER_DOWNOPERATION_GET_DEVICE_PROP_DESCOPERATION_GET_DEVICE_PROP_VALUEOPERATION_SET_DEVICE_PROP_VALUEOPERATION_RESET_DEVICE_PROP_VALUEOPERATION_TERMINATE_OPEN_CAPTUREOPERATION_MOVE_OBJECTOPERATION_COPY_OBJECTOPERATION_GET_PARTIAL_OBJECTOPERATION_INITIATE_OPEN_CAPTUREOPERATION_GET_OBJECT_PROPS_SUPPORTEDOPERATION_GET_OBJECT_PROP_DESCOPERATION_GET_OBJECT_PROP_VALUEOPERATION_SET_OBJECT_PROP_VALUEOPERATION_GET_OBJECT_REFERENCESOPERATION_SET_OBJECT_REFERENCESOPERATION_SKIPString 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. |