WebAppIcon

data class WebAppIcon(val url: String, val sizes: String, val mimeType: String, val density: String) : Icon

Icon information described in Web App Manifest.

This is described by the following JSON.

{
"short_name": "short name",
"name": "long name",
"icons": [
{
"src": "icon-1x.png",
"type": "image/png",
"sizes": "48x48"
},
{
"src": "icon-2x.png",
"type": "image/png",
"sizes": "96x96"
},
{
"src": "icon-4x.png",
"type": "image/png",
"sizes": "192x192"
}
],
"start_url": "index.html"
}

And it is described as follows in HTML.

<link rel="manifest" href="/manifest.json">

Constructors

Link copied to clipboard
constructor(url: String, sizes: String, mimeType: String, density: String)

Properties

Link copied to clipboard

pixel densities.

Link copied to clipboard
open override val length: Int

Icon file length.

Link copied to clipboard
open override val mimeType: String

Icon MIME type. e.g. "image/png"

Link copied to clipboard
open override val precomposed: Boolean = true

true if this is for a precomposed touch icon.

Link copied to clipboard
open override val rel: Relationship

Relationship between icon and page.

Link copied to clipboard
open override val sizes: String

Size information, assumed format is (width)x(height). e.g. "80x80".

Link copied to clipboard
open override val url: String

Icon url.

Functions

Link copied to clipboard
open fun inferArea(): Int

Infer area of this icon.

Link copied to clipboard
open override fun inferSize(): Size

Infer display size of this icon from sizes value.