MtpDevice Class
Definition
This class represents an MTP or PTP device connected on the USB host bus.
[Android.Runtime.Register("android/mtp/MtpDevice", ApiSince=12, DoNotGenerateAcw=true)]
public sealed class MtpDevice : Java.Lang.Object
type MtpDevice = class
inherit Object
- Inheritance
- Attributes
Remarks
Portions of this page are modifications based on work created and shared by the
Constructors
MtpDevice(UsbDevice) |
MtpClient constructor |
Properties
Class |
Returns the unique instance of Class that represents this object's class. (Inherited from Object) |
DeviceId |
Returns the USB ID of the USB device. |
DeviceInfo |
Returns the MtpDeviceInfo for this device |
DeviceName |
Returns the name of the USB device This returns the same value as DeviceName for the device's UsbDevice |
Handle |
The handle to the underlying Android instance. (Inherited from Object) |
JniIdentityHashCode | (Inherited from Object) |
JniPeerMembers | |
PeerReference | (Inherited from Object) |
ThresholdClass |
This API supports the Mono for Android infrastructure and is not intended to be used directly from your code. (Inherited from Object) |
ThresholdType |
This API supports the Mono for Android infrastructure and is not intended to be used directly from your code. (Inherited from Object) |
Methods
Clone() |
Creates and returns a copy of this |
Close() |
Closes all resources related to the MtpDevice object. |
DeleteObject(Int32) |
Deletes an object on the device. |
DeleteObjectAsync(Int32) | |
Dispose() | (Inherited from Object) |
Dispose(Boolean) | (Inherited from Object) |
Equals(Object) |
Compares this instance with the specified object and indicates if they are equal. (Inherited from Object) |
GetHashCode() |
Returns an integer hash code for this object. (Inherited from Object) |
GetObject(Int32, Int32) |
Returns the data for an object as a byte array. |
GetObjectAsync(Int32, Int32) | |
GetObjectHandles(Int32, MtpFormat, Int32) |
Returns the list of object handles for all objects on the given storage unit, with the given format and parent. |
GetObjectInfo(Int32) |
Retrieves the MtpObjectInfo for an object. |
GetParent(Int32) |
Retrieves the object handle for the parent of an object on the device. |
GetPartialObject(Int32, Int64, Int64, Byte[]) | |
GetPartialObject64(Int32, Int64, Int64, Byte[]) | |
GetStorageId(Int32) |
Retrieves the ID of the storage unit containing the given object on the device. |
GetStorageIds() |
Returns the list of IDs for all storage units on this device Information about each storage unit can be accessed via GetStorageInfo(Int32). |
GetStorageInfo(Int32) |
Retrieves the MtpStorageInfo for a storage unit. |
GetThumbnail(Int32) |
Returns the thumbnail data for an object as a byte array. |
GetThumbnailAsync(Int32) | |
ImportFile(Int32, ParcelFileDescriptor) | |
ImportFile(Int32, String) |
Copies the data for an object to a file in external storage. |
ImportFileAsync(Int32, ParcelFileDescriptor) | |
ImportFileAsync(Int32, String) | |
JavaFinalize() |
Invoked when the garbage collector has detected that this instance is no longer reachable. (Inherited from Object) |
Notify() |
Causes a thread which is waiting on this object's monitor (by means of
calling one of the |
NotifyAll() |
Causes all threads which are waiting on this object's monitor (by means
of calling one of the |
Open(UsbDeviceConnection) |
Opens the MTP device. |
ReadEvent(CancellationSignal) | |
SendObject(Int32, Int64, ParcelFileDescriptor) | |
SendObjectInfo(MtpObjectInfo) | |
SetHandle(IntPtr, JniHandleOwnership) |
Sets the Handle property. (Inherited from Object) |
ToArray<T>() | (Inherited from Object) |
ToString() |
Returns a string containing a concise, human-readable description of this object. (Inherited from Object) |
UnregisterFromRuntime() | (Inherited from Object) |
Wait() |
Causes the calling thread to wait until another thread calls the |
Wait(Int64) |
Causes the calling thread to wait until another thread calls the |
Wait(Int64, Int32) |
Causes the calling thread to wait until another thread calls the |
Explicit Interface Implementations
IJavaObjectEx.IsProxy | (Inherited from Object) |
IJavaObjectEx.KeyHandle | (Inherited from Object) |
IJavaObjectEx.NeedsActivation | (Inherited from Object) |
IJavaObjectEx.ToLocalJniHandle() | (Inherited from Object) |
IJavaPeerable.Disposed() | (Inherited from Object) |
IJavaPeerable.DisposeUnlessReferenced() | (Inherited from Object) |
IJavaPeerable.Finalized() | (Inherited from Object) |
IJavaPeerable.JniManagedPeerState | (Inherited from Object) |
IJavaPeerable.SetJniIdentityHashCode(Int32) | (Inherited from Object) |
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) | (Inherited from Object) |
IJavaPeerable.SetPeerReference(JniObjectReference) | (Inherited from Object) |
Extension Methods
JavaCast<TResult>(IJavaObject) |
Performs an Android runtime-checked type conversion. |
JavaCast<TResult>(IJavaObject) | |
GetJniTypeName(IJavaPeerable) |