Translations: 简体中文
First install the component
${LAST_VERSION}
: (Not included 'v')
implementation("io.github.panpf.sketch4:sketch-extensions-apkicon:${LAST_VERSION}")
Then directly pass in the path to the apk file when loading the image:
sketch.enqueue(ImageRequest(context, uri = "/sdcard/sample.apk"))
Important
sketch-extensions-apkicon
The module supports automatic registration of components. For details on component registration, please see the documentation: 《Register component》- Only supports Android platform
First install the component
${LAST_VERSION}
: (Not included 'v')
implementation("io.github.panpf.sketch4:sketch-extensions-appicon:${LAST_VERSION}")
Then use the newAppIconUri()
function to create a dedicated uri when loading the image.
// app.icon://com.github.panpf.sketch.sample/1
val appIconUri = newAppIconUri(packageName = "com.github.panpf.sketch.sample", versionCode = 1)
sketch.enqueue(ImageRequest(context, uri = appIconUri))
Important
- versionCode: App version number. The correct version number must be passed in, because when the icon is modified, the modified icon will be cached on the disk. If you only use packageName is used as the cache key, so the icon will not be refreshed even if the cache is changed after the App version is updated.
sketch-extensions-appicon
The module supports automatic component registration. Please see the documentation for details on component registration. 《Register component》- Only supports Android platform