Reputation: 61
My Question:
Is there a way to achieve one of the following, with an Android 11 device which is connecting to a captive portal without internet, to let a user access a specified website inside the captive network:
What I have done in more detail:
I am currently working on a Wi-Fi captive portal without internet connection. In parallel to the standard captive portal logic, where default HTTP probes from clients are intercepted with a redirect to the captive portal, I am using the in rfc8908 and rfc8910 specified api and captive-portal identification. All clients which visit the captive portal page are automatically unlocked and are then granted access to a specific website which is reachable from inside the captive network. In general a client device connects tho Wi-Fi, the captive portal is opened automatically or by user action, the client is unlocked and redirected to the target website, all without having an active internet connection. This works with the iOS I have used for testing, including iOS 14 and with most Android devices below Android 11. Android 11 is where the problem occurs.
When an Android 11 device connects to the network the "Sign in to a Wi-Fi network" notification pops up and after taping the notification the captive portal is opened in androids captive browser. This is the point at which the client is being unlocked and redirected to the target website inside the captive browser. The Problem is, that the device is still stating "Sign-in required" in the Wi-Fi settings tab after it has been unlocked.
What should happen is that the in the captive api response included '"venue-info-url":"..."' should be opened or at least easily accessible for the user. In a scenario where the device has internet after it has been unlocked from captivity, the user gets a notification "Connected/Tap to view website" which opens the target website inside a regular browser.
The reason why this is not working in my case is persumably that the device knows that it does not have an active internet connection and it wants the client to confirm that it should stay connected to the Wi-Fi even without internet connection. But the device is not sending any notification, which asks the user whether it should stay connected until the client disconnects and reconnects to the Wi-Fi because then the device is unlocked from the get go and just asks the user whether the device should stay connected without internet. After the client chooses tho stay in the network the target page is opened.
The only way for the client to connect to the network and tell the device that it shuld stay connected even without internet, is through the more option (three dots on the top right) inside the captive browser which is not really a great option for users who do not know that this option exists. When the user closes the captive browser nothing happens and the device still wants the user to sign into the network.
Upvotes: 2
Views: 2229