MtpDeviceInfo
  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.
Summary
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 | |
|---|---|
Public methods
getEventsSupported
public final 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:
MtpEvent.EVENT_UNDEFINEDMtpEvent.EVENT_CANCEL_TRANSACTIONMtpEvent.EVENT_OBJECT_ADDEDMtpEvent.EVENT_OBJECT_REMOVEDMtpEvent.EVENT_STORE_ADDEDMtpEvent.EVENT_STORE_REMOVEDMtpEvent.EVENT_DEVICE_PROP_CHANGEDMtpEvent.EVENT_OBJECT_INFO_CHANGEDMtpEvent.EVENT_DEVICE_INFO_CHANGEDMtpEvent.EVENT_REQUEST_OBJECT_TRANSFERMtpEvent.EVENT_STORE_FULLMtpEvent.EVENT_DEVICE_RESETMtpEvent.EVENT_STORAGE_INFO_CHANGEDMtpEvent.EVENT_CAPTURE_COMPLETEMtpEvent.EVENT_UNREPORTED_STATUSMtpEvent.EVENT_OBJECT_PROP_CHANGEDMtpEvent.EVENT_OBJECT_PROP_DESC_CHANGEDMtpEvent.EVENT_OBJECT_REFERENCES_CHANGED
getManufacturer
public final String getManufacturer ()
Returns the manufacturer's name for the MTP device
| Returns | |
|---|---|
String | 
        the manufacturer name
 This value cannot be null. | 
      
getModel
public final String getModel ()
Returns the model name for the MTP device
| Returns | |
|---|---|
String | 
        the model name
 This value cannot be null. | 
      
getOperationsSupported
public final 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:
MtpConstants.OPERATION_GET_DEVICE_INFOMtpConstants.OPERATION_OPEN_SESSIONMtpConstants.OPERATION_CLOSE_SESSIONMtpConstants.OPERATION_GET_STORAGE_I_DSMtpConstants.OPERATION_GET_STORAGE_INFOMtpConstants.OPERATION_GET_NUM_OBJECTSMtpConstants.OPERATION_GET_OBJECT_HANDLESMtpConstants.OPERATION_GET_OBJECT_INFOMtpConstants.OPERATION_GET_OBJECTMtpConstants.OPERATION_GET_THUMBMtpConstants.OPERATION_DELETE_OBJECTMtpConstants.OPERATION_SEND_OBJECT_INFOMtpConstants.OPERATION_SEND_OBJECTMtpConstants.OPERATION_INITIATE_CAPTUREMtpConstants.OPERATION_FORMAT_STOREMtpConstants.OPERATION_RESET_DEVICEMtpConstants.OPERATION_SELF_TESTMtpConstants.OPERATION_SET_OBJECT_PROTECTIONMtpConstants.OPERATION_POWER_DOWNMtpConstants.OPERATION_GET_DEVICE_PROP_DESCMtpConstants.OPERATION_GET_DEVICE_PROP_VALUEMtpConstants.OPERATION_SET_DEVICE_PROP_VALUEMtpConstants.OPERATION_RESET_DEVICE_PROP_VALUEMtpConstants.OPERATION_TERMINATE_OPEN_CAPTUREMtpConstants.OPERATION_MOVE_OBJECTMtpConstants.OPERATION_COPY_OBJECTMtpConstants.OPERATION_GET_PARTIAL_OBJECTMtpConstants.OPERATION_INITIATE_OPEN_CAPTUREMtpConstants.OPERATION_GET_OBJECT_PROPS_SUPPORTEDMtpConstants.OPERATION_GET_OBJECT_PROP_DESCMtpConstants.OPERATION_GET_OBJECT_PROP_VALUEMtpConstants.OPERATION_SET_OBJECT_PROP_VALUEMtpConstants.OPERATION_GET_OBJECT_REFERENCESMtpConstants.OPERATION_SET_OBJECT_REFERENCESMtpConstants.OPERATION_SKIP
getSerialNumber
public final String getSerialNumber ()
Returns the unique serial number for the MTP device
| Returns | |
|---|---|
String | 
        the serial number
 This value cannot be null. | 
      
getVersion
public final String getVersion ()
Returns the version string the MTP device
| Returns | |
|---|---|
String | 
        the device version
 This value cannot be null. | 
      
isEventSupported
public 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. | 
isOperationSupported
public 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. |