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

haris mehmood

05/19/2021, 10:08 AM
Hi can anyone help me show network error to user when wifi is connected but no internet access like youtube?
t

Tower Guidev2

05/19/2021, 10:12 AM
attemp HTTP GET on this URL
Copy code
const val GOOGLE_CONNECTIVITY_CHECK_URL = "<https://connectivitycheck.gstatic.com/generate_204>"
and check for
Copy code
/**
 * HTTP Status-Code 204: No Content.
 */
public static final int HTTP_NO_CONTENT = 204;
д

Дмитрій Канунниковъ

05/19/2021, 8:54 PM
15 Views