I tried with Android 5.x and 4.x and both work, but I have no idea about other phones. This link shows many other ways about how smartphones check about a captive portal: - http://stackoverflow.com/a/13365853/2187091