fromDomainWithDownload

fun fromDomainWithDownload(siteUrl: String, withPrecomposed: Boolean = true, sizes: List<String> = emptyList()): Pair<Icon, ByteArray>?

It performs the same processing as fromDomain using HTTP GET, and downloads binary if icon exists.

Do not call from main thread to avoid NetworkOnMainThreadException

Since fromDomain get only the icon information, the binary data of the icon needs to be downloaded again using HTTP GET. In this method, HTTP GET is used to confirm the existence of the icon, and if there is an icon, download is also done. The result is returned with icon information and binary Pair.

Do not call from main thread.

Return

Pair of first acquired icon and that binary

Parameters

siteUrl

URL of analysis target page

withPrecomposed

If specify true, include the "precomposed". default is true

sizes

Specify this when appending size (e.g. 80x80) to apple-touch-icon. Default is empty.