# Print output for @column tags ?>
Developers

- Design
- Develop
- Distribute

Developer Console

## Most visited

## Recently visited

## Results for

Summary: Constants | Methods | Inherited Methods

# MtpEvent

`public class MtpEvent`
`extends Object` ``

java.lang.Object
↳ | android.mtp.MtpEvent

This class encapsulates information about a MTP event. This corresponds to the events described in appendix G of the MTP specification.

## Summary

### Constants
`int` | `EVENT_CANCEL_TRANSACTION` Event code for CANCEL_TRANSACTION event
`int` | `EVENT_CAPTURE_COMPLETE` Event code for CAPTURE_COMPLETE event
`int` | `EVENT_DEVICE_INFO_CHANGED` Event code for DEVICE_INFO_CHANGED event
`int` | `EVENT_DEVICE_PROP_CHANGED` Event code for DEVICE_PROP_CHANGED event
`int` | `EVENT_DEVICE_RESET` Event code for DEVICE_RESET event
`int` | `EVENT_OBJECT_ADDED` Event code for OBJECT_ADDED event
`int` | `EVENT_OBJECT_INFO_CHANGED` Event code for OBJECT_INFO_CHANGED event
`int` | `EVENT_OBJECT_PROP_CHANGED` Event code for OBJECT_PROP_CHANGED event
`int` | `EVENT_OBJECT_PROP_DESC_CHANGED` Event code for OBJECT_PROP_DESC_CHANGED event
`int` | `EVENT_OBJECT_REFERENCES_CHANGED` Event code for OBJECT_REFERENCES_CHANGED event
`int` | `EVENT_OBJECT_REMOVED` Event code for OBJECT_REMOVED event
`int` | `EVENT_REQUEST_OBJECT_TRANSFER` Event code for REQUEST_OBJECT_TRANSFER event
`int` | `EVENT_STORAGE_INFO_CHANGED` Event code for STORAGE_INFO_CHANGED event
`int` | `EVENT_STORE_ADDED` Event code for STORE_ADDED event
`int` | `EVENT_STORE_FULL` Event code for STORE_FULL event
`int` | `EVENT_STORE_REMOVED` Event code for STORE_REMOVED event
`int` | `EVENT_UNDEFINED` Event code for UNDEFINED event
`int` | `EVENT_UNREPORTED_STATUS` Event code for UNREPORTED_STATUS event

### Public methods
`int` | `getDevicePropCode()` Obtains devicePropCode event parameter.
`int` | `getEventCode()` Returns event code of MTP event.
`int` | `getObjectFormatCode()` Obtains objectFormatCode event parameter.
`int` | `getObjectHandle()` Obtains objectHandle event parameter.
`int` | `getObjectPropCode()` Obtains objectPropCode event parameter.
`int` | `getParameter1()` Obtains the first event parameter.
`int` | `getParameter2()` Obtains the second event parameter.
`int` | `getParameter3()` Obtains the third event parameter.
`int` | `getStorageId()` Obtains storageID event parameter.
`int` | `getTransactionId()` Obtains transactionID event parameter.

### Inherited methods
From class `java.lang.Object`
`Object` | `clone()` Creates and returns a copy of this object.
`boolean` | `equals(Object obj)` Indicates whether some other object is "equal to" this one.
`void` | `finalize()` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
`final Class<?>` | `getClass()` Returns the runtime class of this `Object`.
`int` | `hashCode()` Returns a hash code value for the object.
`final void` | `notify()` Wakes up a single thread that is waiting on this object's monitor.
`final void` | `notifyAll()` Wakes up all threads that are waiting on this object's monitor.
`String` | `toString()` Returns a string representation of the object.
`final void` | `wait(long timeout, int nanos)` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
`final void` | `wait(long timeout)` Causes the current thread to wait until either another thread invokes the `notify()` method or the `notifyAll()` method for this object, or a specified amount of time has elapsed.
`final void` | `wait()` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object.

## Constants

### EVENT_CANCEL_TRANSACTION

    public static final int EVENT_CANCEL_TRANSACTION

Event code for CANCEL_TRANSACTION event

Constant Value: 16385 (0x00004001)

### EVENT_CAPTURE_COMPLETE

    public static final int EVENT_CAPTURE_COMPLETE

Event code for CAPTURE_COMPLETE event

Constant Value: 16397 (0x0000400d)

### EVENT_DEVICE_INFO_CHANGED

    public static final int EVENT_DEVICE_INFO_CHANGED

Event code for DEVICE_INFO_CHANGED event

Constant Value: 16392 (0x00004008)

### EVENT_DEVICE_PROP_CHANGED

    public static final int EVENT_DEVICE_PROP_CHANGED

Event code for DEVICE_PROP_CHANGED event

Constant Value: 16390 (0x00004006)

### EVENT_DEVICE_RESET

    public static final int EVENT_DEVICE_RESET

Event code for DEVICE_RESET event

Constant Value: 16395 (0x0000400b)

### EVENT_OBJECT_ADDED

    public static final int EVENT_OBJECT_ADDED

Event code for OBJECT_ADDED event

Constant Value: 16386 (0x00004002)

### EVENT_OBJECT_INFO_CHANGED

    public static final int EVENT_OBJECT_INFO_CHANGED

Event code for OBJECT_INFO_CHANGED event

Constant Value: 16391 (0x00004007)

### EVENT_OBJECT_PROP_CHANGED

    public static final int EVENT_OBJECT_PROP_CHANGED

Event code for OBJECT_PROP_CHANGED event

Constant Value: 51201 (0x0000c801)

### EVENT_OBJECT_PROP_DESC_CHANGED

    public static final int EVENT_OBJECT_PROP_DESC_CHANGED

Event code for OBJECT_PROP_DESC_CHANGED event

Constant Value: 51202 (0x0000c802)

### EVENT_OBJECT_REFERENCES_CHANGED

    public static final int EVENT_OBJECT_REFERENCES_CHANGED

Event code for OBJECT_REFERENCES_CHANGED event

Constant Value: 51203 (0x0000c803)

### EVENT_OBJECT_REMOVED

    public static final int EVENT_OBJECT_REMOVED

Event code for OBJECT_REMOVED event

Constant Value: 16387 (0x00004003)

### EVENT_REQUEST_OBJECT_TRANSFER

    public static final int EVENT_REQUEST_OBJECT_TRANSFER

Event code for REQUEST_OBJECT_TRANSFER event

Constant Value: 16393 (0x00004009)

### EVENT_STORAGE_INFO_CHANGED

    public static final int EVENT_STORAGE_INFO_CHANGED

Event code for STORAGE_INFO_CHANGED event

Constant Value: 16396 (0x0000400c)

### EVENT_STORE_ADDED

    public static final int EVENT_STORE_ADDED

Event code for STORE_ADDED event

Constant Value: 16388 (0x00004004)

### EVENT_STORE_FULL

    public static final int EVENT_STORE_FULL

Event code for STORE_FULL event

Constant Value: 16394 (0x0000400a)

### EVENT_STORE_REMOVED

    public static final int EVENT_STORE_REMOVED

Event code for STORE_REMOVED event

Constant Value: 16389 (0x00004005)

### EVENT_UNDEFINED

    public static final int EVENT_UNDEFINED

Event code for UNDEFINED event

Constant Value: 16384 (0x00004000)

### EVENT_UNREPORTED_STATUS

    public static final int EVENT_UNREPORTED_STATUS

Event code for UNREPORTED_STATUS event

Constant Value: 16398 (0x0000400e)

## Public methods

### getDevicePropCode

    public int getDevicePropCode ()

Obtains devicePropCode event parameter.

Returns
`int` |

See also:

- `EVENT_DEVICE_PROP_CHANGED`

### getEventCode

    public int getEventCode ()

Returns event code of MTP event. See the USB-IF MTP specification for the details of event constants.

Returns
`int` | event code

### getObjectFormatCode

    public int getObjectFormatCode ()

Obtains objectFormatCode event parameter.

Returns
`int` |

See also:

- `EVENT_OBJECT_PROP_DESC_CHANGED`

### getObjectHandle

    public int getObjectHandle ()

Obtains objectHandle event parameter.

Returns
`int` |

See also:

- `EVENT_OBJECT_ADDED`
- `EVENT_OBJECT_REMOVED`
- `EVENT_OBJECT_INFO_CHANGED`
- `EVENT_REQUEST_OBJECT_TRANSFER`
- `EVENT_OBJECT_PROP_CHANGED`
- `EVENT_OBJECT_REFERENCES_CHANGED`

### getObjectPropCode

    public int getObjectPropCode ()

Obtains objectPropCode event parameter.

Returns
`int` |

See also:

- `EVENT_OBJECT_PROP_CHANGED`
- `EVENT_OBJECT_PROP_DESC_CHANGED`

### getParameter1

    public int getParameter1 ()

Obtains the first event parameter.

Returns
`int` |

### getParameter2

    public int getParameter2 ()

Obtains the second event parameter.

Returns
`int` |

### getParameter3

    public int getParameter3 ()

Obtains the third event parameter.

Returns
`int` |

### getStorageId

    public int getStorageId ()

Obtains storageID event parameter.

Returns
`int` |

See also:

- `EVENT_STORE_ADDED`
- `EVENT_STORE_REMOVED`
- `EVENT_STORE_FULL`
- `EVENT_STORAGE_INFO_CHANGED`

### getTransactionId

    public int getTransactionId ()

Obtains transactionID event parameter.

Returns
`int` |

See also:

- `EVENT_CAPTURE_COMPLETE`

Full name *
Email address *
Company / developer name
One of your Play Store app URLs *
Which best describes your business:*
Apps
Games
Apps & Games
*
*