Of note: this is also considered a walled garden in addition to captive portal. In case that helps anyone. Also, here is the code Android uses to do its detection:
http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.0.1_r1/android/net/wifi/WifiWatchdogStateMachine.java#WifiWatchdogStateMachine.isWalledGardenConnection%28%29
This works because a captive portal will not return a 204 if it is rerouting traffic.
Of note: this is also considered a walled garden in addition to captive portal. In case that helps anyone. Also, here is the code Android uses to do its detection:
http:// grepcode. com/file/ repository. grepcode. com/java/ ext/com. google. android/ android/ 4.0.1_r1/ android/ net/wifi/ WifiWatchdogSta teMachine. java#WifiWatchd ogStateMachine. isWalledGardenC onnection% 28%29
This works because a captive portal will not return a 204 if it is rerouting traffic.