Improved the fetching and downloading the online library on low bandwidth.

* Since the online library file is 19MB large and on slow bandwidth devices it takes more time to fetch that file. Our current read timeout is 60 seconds which is not enough for reading this file on slow bandwidth devices. So we have increased it to 180 seconds.
This commit is contained in:
MohitMaliFtechiz 2024-09-17 15:04:16 +05:30
parent c5d0d8aeea
commit 8ebeb4e3e9

View File

@ -31,7 +31,11 @@ import java.util.concurrent.TimeUnit.SECONDS
import javax.inject.Singleton
const val CONNECTION_TIMEOUT = 10L
const val READ_TIMEOUT = 60L
// increase the read timeout since the content is 19MB large so it takes
// more time to read on slow internet connection, and due to less read timeout
// the request is canceled.
const val READ_TIMEOUT = 180L
const val CALL_TIMEOUT = 60L
const val USER_AGENT = "kiwix-android-version:${BuildConfig.VERSION_CODE}"
const val KIWIX_DOWNLOAD_URL = "https://mirror.download.kiwix.org/"