Stack Exchange Network
Stack Exchange network consists of 181 Q&A communities including
Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack Exchange
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It only takes a minute to sign up.
Sign up to join this community
Anybody can ask a question
The best answers are voted up and rise to the top
7 years, 8 months ago
When the device tries to connect to an access point or router, it has to sign in on the captive portal page with the message saying
"Sign in to Wi-Fi network".
How does the access point/router identify that a sign in is required for the device and what is the process behind it?
Sep 15, 2015 at 8:24
Sagar Vaghela Sagar Vaghela
383 1 1 gold badge 5 5 silver badges 9 9 bronze badges
The detection url differs between different Android versions.
For Marshmallow, it uses connectivitycheck.gstatic.com/generate_204, check the code here
AndroidXRef - Marshmallow 6.0.0_r1
For Kitkat, it uses clients3.google.com/generate_204
check the code
AndroidXRef - KitKat 4.4.4_r1
3,096 7 7 gold badges 21 21 silver badges 40 40 bronze badges
Nov 25, 2015 at 0:10
466 4 4 silver badges 4 4 bronze badges
This technology is called "Captive portal". There are several implementations. As I know, Android tries to reach a file named
generate_204 on one of the Google servers and if it is not possible, a notification in generated.
Further reading on Wikipedia:
Sep 15, 2015 at 8:55
1,113 1 1 gold badge 8 8 silver badges 16 16 bronze badges
A captive portal is generally implemented by directing all traffic to a valid HTTP response (200). This HTTP response is what appears in the captive portal.
This can be done with tools like iptables or dnsmasq.
Mar 9, 2017 at 23:15
log in to answer this question.
Highly active question
. Earn 10 reputation (not counting the
) in order to answer this question. The reputation requirement helps protect this question from spam and non-answer activity.
Not the answer you're looking for? Browse other questions tagged
By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our
Accept all cookies
Necessary cookies only