java.lang.Object | |
↳ | chan.content.model.EmbeddedAttachment |
This class can handle some embedded links. See obtain(String)
.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
EmbeddedAttachment.ContentType | Embedded file content type. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructor for |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns attachment content type. | |||||||||||
Returns attachment embedded type. | |||||||||||
Returns attachment file URI. | |||||||||||
Returns forced file name. | |||||||||||
Returns attachment thumbnail URI. | |||||||||||
Returns whether attachment could be downloaded by it's file URI. | |||||||||||
Returns |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Constructor for EmbeddedAttachment
.
By default file name will be obtain from the last path segment of file URI. You can override this name
with forcedName
argument.
Parameters | |
---|---|
fileUri |
Uri :
File or page URI. |
thumbnailUri |
Uri :
Thumbnail URI. |
embeddedType |
String :
Embedded file type string. For example, "YouTube". |
contentType |
EmbeddedAttachment.ContentType :
Content type. |
canDownload |
boolean :
If fileUri is direct file URI, you can pass true . This allows user to download file. |
forcedName |
String :
Overridden file name.
|
Returns attachment content type.
Returns | |
---|---|
EmbeddedAttachment.ContentType |
Returns attachment embedded type.
Returns | |
---|---|
String |
Returns attachment file URI.
Returns | |
---|---|
Uri |
Returns forced file name.
Returns | |
---|---|
String |
Returns attachment thumbnail URI.
Returns | |
---|---|
Uri |
Returns whether attachment could be downloaded by it's file URI.
Returns | |
---|---|
boolean |
Returns EmbeddedAttachment
if client support this type by itself.
List of supported embedded types:
You can pass any string as data
argument that contains links from the list above including strings
with embed
or iframe
HTML tags. Application will try to find links by itself.
Parameters | |
---|---|
data |
String :
String with URI. |
Returns | |
---|---|
EmbeddedAttachment |
EmbeddedAttachment instance or null if embedded link is not supported.
|