ApkUpdater

Functions

Link copied to clipboard
fun clearOldFiles(activity: Activity)
Link copied to clipboard
suspend fun legacyDownloader(activity: Activity, readStream: InputStream, length: Long?, digest: DigestPair?, downloadProgress: (Long, Long?) -> Unit)
Link copied to clipboard
fun openApk(context: Context, file: File)
Link copied to clipboard
suspend fun packageInstallerDownloader(activity: Activity, readStream: InputStream, length: Long?, digest: DigestPair?, downloadProgress: (Long, Long?) -> Unit)

https://medium.com/@solrudev/painless-building-of-an-android-package-installer-app-d5a09b5df432

Link copied to clipboard
suspend fun transfer(writeStream: OutputStream, readStream: InputStream, length: Long?, downloadProgress: (Long, Long?) -> Unit, digest: DigestPair?)

Write the "readStream" to the "writeStream", while notifying the "downloadProgress" and calculating the digest

Link copied to clipboard
open suspend override fun update(settings: AppSettings, url: String, digest: DigestPair?, downloadProgress: (Long, Long?) -> Unit)