MtpObjectInfo
class MtpObjectInfo
kotlin.Any | |
↳ | android.mtp.MtpObjectInfo |
This class encapsulates information about an object on an MTP device. This corresponds to the ObjectInfo Dataset described in section 5.3.1 of the MTP specification.
Summary
Nested classes | |
---|---|
Builds a new object info instance. |
Public methods | |
---|---|
Int |
Returns the association description for the MTP object Will be zero objects that are not of format |
Int |
Returns the association type for the MTP object Will be zero objects that are not of format |
Int |
Returns the size of the MTP object |
Long |
Returns the size of the MTP object |
Long |
Returns the creation date of the MTP object The value is represented as milliseconds since January 1, 1970 |
Long |
Returns the modification date of the MTP object The value is represented as milliseconds since January 1, 1970 |
Int |
Returns the format code for the MTP object |
Int |
Returns the depth of the MTP object in bits per pixel Will be zero for non-image objects |
Long |
Returns the depth of the MTP object in bits per pixel Will be zero for non-image objects |
Int |
Returns the height of the MTP object in pixels Will be zero for non-image objects |
Long |
Returns the height of the MTP object in pixels Will be zero for non-image objects |
Int |
Returns the width of the MTP object in pixels Will be zero for non-image objects |
Long |
Returns the width of the MTP object in pixels Will be zero for non-image objects |
String |
Returns a comma separated list of keywords for the MTP object |
String |
getName() Returns the name of the MTP object |
Int |
Returns the object handle for the MTP object |
Int |
Returns the object handle for the object's parent Will be zero for the root directory of a storage unit |
Int |
Returns the protection status for the MTP object Possible values are: |
Int |
Returns the sequence number for the MTP object This field is typically not used for MTP devices, but is sometimes used to define a sequence of photos on PTP cameras. |
Long |
Returns the sequence number for the MTP object This field is typically not used for MTP devices, but is sometimes used to define a sequence of photos on PTP cameras. |
Int |
Returns the storage ID for the MTP object's storage unit |
Int |
Returns the size of the MTP object's thumbnail Will be zero for objects with no thumbnail |
Long |
Returns the size of the MTP object's thumbnail Will be zero for objects with no thumbnail |
Int |
Returns the format code for the MTP object's thumbnail Will be zero for objects with no thumbnail |
Int |
Returns the height of the MTP object's thumbnail in pixels Will be zero for objects with no thumbnail |
Long |
Returns the height of the MTP object's thumbnail in pixels Will be zero for objects with no thumbnail |
Int |
Returns the width of the MTP object's thumbnail in pixels Will be zero for objects with no thumbnail |
Long |
Returns the width of the MTP object's thumbnail in pixels Will be zero for objects with no thumbnail |
Public methods
getAssociationDesc
fun getAssociationDesc(): Int
Returns the association description for the MTP object Will be zero objects that are not of format android.mtp.MtpConstants#FORMAT_ASSOCIATION
Return | |
---|---|
Int |
the object's association description |
getAssociationType
fun getAssociationType(): Int
Returns the association type for the MTP object Will be zero objects that are not of format android.mtp.MtpConstants#FORMAT_ASSOCIATION
For directories the association type is typically android.mtp.MtpConstants#ASSOCIATION_TYPE_GENERIC_FOLDER
Return | |
---|---|
Int |
the object's association type |
getCompressedSize
fun getCompressedSize(): Int
Returns the size of the MTP object
Return | |
---|---|
Int |
the object size |
getCompressedSizeLong
fun getCompressedSizeLong(): Long
Returns the size of the MTP object
Return | |
---|---|
Long |
the object size |
getDateCreated
fun getDateCreated(): Long
Returns the creation date of the MTP object The value is represented as milliseconds since January 1, 1970
Return | |
---|---|
Long |
the object's creation date |
getDateModified
fun getDateModified(): Long
Returns the modification date of the MTP object The value is represented as milliseconds since January 1, 1970
Return | |
---|---|
Long |
the object's modification date |
getFormat
fun getFormat(): Int
Returns the format code for the MTP object
Return | |
---|---|
Int |
the format code |
getImagePixDepth
fun getImagePixDepth(): Int
Returns the depth of the MTP object in bits per pixel Will be zero for non-image objects
Return | |
---|---|
Int |
the image depth |
getImagePixDepthLong
fun getImagePixDepthLong(): Long
Returns the depth of the MTP object in bits per pixel Will be zero for non-image objects
Return | |
---|---|
Long |
the image depth |
getImagePixHeight
fun getImagePixHeight(): Int
Returns the height of the MTP object in pixels Will be zero for non-image objects
Return | |
---|---|
Int |
the image height |
getImagePixHeightLong
fun getImagePixHeightLong(): Long
Returns the height of the MTP object in pixels Will be zero for non-image objects
Return | |
---|---|
Long |
the image height |
getImagePixWidth
fun getImagePixWidth(): Int
Returns the width of the MTP object in pixels Will be zero for non-image objects
Return | |
---|---|
Int |
the image width |
getImagePixWidthLong
fun getImagePixWidthLong(): Long
Returns the width of the MTP object in pixels Will be zero for non-image objects
Return | |
---|---|
Long |
the image width |
getKeywords
fun getKeywords(): String
Returns a comma separated list of keywords for the MTP object
Return | |
---|---|
String |
the object's keyword list This value cannot be null . |
getName
fun getName(): String
Returns the name of the MTP object
Return | |
---|---|
String |
the object's name This value cannot be null . |
getObjectHandle
fun getObjectHandle(): Int
Returns the object handle for the MTP object
Return | |
---|---|
Int |
the object handle |
getParent
fun getParent(): Int
Returns the object handle for the object's parent Will be zero for the root directory of a storage unit
Return | |
---|---|
Int |
the object's parent |
getProtectionStatus
fun getProtectionStatus(): Int
Returns the protection status for the MTP object Possible values are:
-
android.mtp.MtpConstants#PROTECTION_STATUS_NONE
-
android.mtp.MtpConstants#PROTECTION_STATUS_READ_ONLY
-
android.mtp.MtpConstants#PROTECTION_STATUS_NON_TRANSFERABLE_DATA
Return | |
---|---|
Int |
the protection status |
getSequenceNumber
fun getSequenceNumber(): Int
Returns the sequence number for the MTP object This field is typically not used for MTP devices, but is sometimes used to define a sequence of photos on PTP cameras.
Return | |
---|---|
Int |
the object's sequence number |
getSequenceNumberLong
fun getSequenceNumberLong(): Long
Returns the sequence number for the MTP object This field is typically not used for MTP devices, but is sometimes used to define a sequence of photos on PTP cameras.
Return | |
---|---|
Long |
the object's sequence number |
getStorageId
fun getStorageId(): Int
Returns the storage ID for the MTP object's storage unit
Return | |
---|---|
Int |
the storage ID |
getThumbCompressedSize
fun getThumbCompressedSize(): Int
Returns the size of the MTP object's thumbnail Will be zero for objects with no thumbnail
Return | |
---|---|
Int |
the thumbnail size |
getThumbCompressedSizeLong
fun getThumbCompressedSizeLong(): Long
Returns the size of the MTP object's thumbnail Will be zero for objects with no thumbnail
Return | |
---|---|
Long |
the thumbnail size |
getThumbFormat
fun getThumbFormat(): Int
Returns the format code for the MTP object's thumbnail Will be zero for objects with no thumbnail
Return | |
---|---|
Int |
the thumbnail format code |
getThumbPixHeight
fun getThumbPixHeight(): Int
Returns the height of the MTP object's thumbnail in pixels Will be zero for objects with no thumbnail
Return | |
---|---|
Int |
the thumbnail height |
getThumbPixHeightLong
fun getThumbPixHeightLong(): Long
Returns the height of the MTP object's thumbnail in pixels Will be zero for objects with no thumbnail
Return | |
---|---|
Long |
the thumbnail height |
getThumbPixWidth
fun getThumbPixWidth(): Int
Returns the width of the MTP object's thumbnail in pixels Will be zero for objects with no thumbnail
Return | |
---|---|
Int |
the thumbnail width |
getThumbPixWidthLong
fun getThumbPixWidthLong(): Long
Returns the width of the MTP object's thumbnail in pixels Will be zero for objects with no thumbnail
Return | |
---|---|
Long |
the thumbnail width |