this prevent to download the whole apk to install, especially in certain area, there are some limitation as my phone don't allow external apk due to work profile, this causes inconvenience to download the whole APK once again, I suggest adding a delta patch, which allow
`// Example to download a patch file (delta update) using Kotlin
fun downloadDeltaUpdate(patchUrl: String, outputPath: String) {
val url = URL(patchUrl)
val connection = url.openConnection() as HttpURLConnection
connection.requestMethod = "GET"
connection.connect()
val inputStream = connection.inputStream
val outputStream = FileOutputStream(outputPath)
val buffer = ByteArray(1024)
var length: Int
while (inputStream.read(buffer).also { length = it } != -1) {
outputStream.write(buffer, 0, length)
}
inputStream.close()
outputStream.close()
}
// Applying the delta update (patch)
fun applyDeltaPatch(originalApk: String, patchFile: String, outputApk: String) {
// Use a library like xdelta or bsdiff to apply the patch
val command = arrayOf("xdelta3", "-d", "-s", originalApk, patchFile, outputApk)
val process = Runtime.getRuntime().exec(command)
process.waitFor() // Wait for the process to complete
}
`
Description
Introduce, https://en.wikipedia.org/wiki/Delta_update
Suggested Solution
this prevent to download the whole apk to install, especially in certain area, there are some limitation as my phone don't allow external apk due to work profile, this causes inconvenience to download the whole APK once again, I suggest adding a delta patch, which allow
Alternatives
No response
Additional Context
No response