Kotlin-Coroutines-Android-Examples icon indicating copy to clipboard operation
Kotlin-Coroutines-Android-Examples copied to clipboard

How to handle no internet connection

Open iamkdblue opened this issue 5 years ago • 1 comments

Thanks for this great project

I tried your code, but its show whole IP address of API, but I want to show only "no internet connection when there is no internet connection"

iamkdblue avatar Aug 24 '20 19:08 iamkdblue

In this project, We are simply sharing the exception message or a generic message "Something Went Wrong" We can handle no internet available scenario based on our application architecture to check the internet before making call.

https://github.com/MindorksOpenSource/Kotlin-Coroutines-Android-Examples/blob/adc18ea7213887e0da6924bd6efa0bf0158e60de/app/src/main/java/com/mindorks/example/coroutines/learn/retrofit/single/SingleNetworkCallViewModel.kt#L31

mwshubham avatar Apr 18 '21 05:04 mwshubham