https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
h

Hossein Amini

06/20/2021, 8:51 AM
In KMM projects, is it possible to check internet connection with Ktor? I want to write my code in shared module and use in both iOS and Android platforms #ktor
r

Rob

06/20/2021, 12:30 PM
I don't know if Ktor can check for connectivity. Each platform has it's own methods for determining connectivity. I would use those.
a

Andrey Chernov

06/20/2021, 5:12 PM
In moko-network we use extension for throwable to check network error kind In common code - https://github.com/icerockdev/moko-network/blob/master/network/src/commonMain/kotlin/dev/icerock/moko/network/NetworkConnectionError.kt
3 Views