AIMessageAttachment
class AIMessageAttachment(val kind: AIMessageAttachment.Kind, val uri: Uri? = null, val bitmap: ImageBitmap? = null, val name: String? = null, val size: Long? = null, val mimeType: String? = null, val extraData: Map<String, Any?> = emptyMap())
Something a message carries besides its text, such as an image or a file.
Parameters
kind
What kind of attachment it is.
uri
Where it is: on the web, or on this device, such as a content:// URI the person picked.
bitmap
The image itself when the app holds it, such as a photo the person just took. It shows rather than the one at uri. Pass a small one, the size it shows at: it stays in memory while the conversation shows it.
name
Its name, such as the file's.
size
Its size, in bytes.
mimeType
Its media type, such as application/pdf. Without it, the type comes from the extension of its name or URI.
extraData
Data of its own, such as what an attachment of a kind of your own needs.
Constructors
Link copied to clipboard
constructor(kind: AIMessageAttachment.Kind, uri: Uri? = null, bitmap: ImageBitmap? = null, name: String? = null, size: Long? = null, mimeType: String? = null, extraData: Map<String, Any?> = emptyMap())