captive portal redirect pop-up - Android Q&A, Help & Troubleshooting

What specifically has to happen for an android device to pop-up the window that asks you to go to a sign-in or other landing page on a captive portal hotspot? I grab all dns requests and respond with the access-point's address, I grab /generate_204 and other device paths and have tried responding with 200 (blank OK), 200 with the landing page content, 200 with a redirect meta tag in the header, 302 with an http redirect. Nothing seems to do any more than cause android to complain about limited connectivity.

treii28 said:
What specifically has to happen for an android device to pop-up the window that asks you to go to a sign-in or other landing page on a captive portal hotspot? I grab all dns requests and respond with the access-point's address, I grab /generate_204 and other device paths and have tried responding with 200 (blank OK), 200 with the landing page content, 200 with a redirect meta tag in the header, 302 with an http redirect. Nothing seems to do any more than cause android to complain about limited connectivity.
Click to expand...
Click to collapse
This might help you https://forum.xda-developers.com/showthread.php?t=2113718&page=2

captive portal redirect pop-up.
check this thread by me.
fully working captive portal on android with php support too.

Related

Tasker: Login in HTTPS site and get source code

So guys, i'm again working with tasker and i'm trying to get the source code of a web page, reachable only after logging in.
I tried to log in so far using HTTP post plugin (don't know if i can add link to market)
So, i post data to the login page, with 2 parameters and values (username and password). Notification says, "post succesful". I don't know why but in the %HTTPR variable i read "301" (HTML error i think, and i think it means Moved page o.o)
What am i doing wrong?

[Q] WebView with user-defined URL and fading out address field

Hello!
I am new into Android developing. I got some experience with WebView, though. I already managed to create a fullscreen WebView with hard coded URL, some features, etc.
What I want to do now is the following:
1) first, the user should get an address field when the app starts where he/she is able to type an own URL
2) then this field should disappear
3) after that WebView is loaded as usual, but in fullscreen mode without status of the device, etc
I am able to do 3), no problem here. What I don't get is how WebView handles this address field: I already made an application with a static address field and a go button. But this address field is there all the time. If I could fade it out somehow after an user typed the address it would also help, I think.
Hope to hear from you soon!
All the best

[Q] Hotspot force redirect to Local Server

I got this crazy idea that I don't know is possible or not... what I want to do is set up my phone as wifi access point, then allow people to connect to it, but handle all incoming http traffic myself.
So:
Create a server (with KWS - Android web server)
client can connect to the phone
when client tries to open an http connection to any random server, this has to be intercepted by my app and handled by a local web server
Anyone knows any android app to do this ?
What you are talking about is a captive portal.
I made a simple app for this purpose. If you are a developer, I need your help to improve the app. For downloading the app and source code check this thread https://forum.xda-developers.com/android/general/guide-setup-fake-captive-portal-android-t4011689

"Sign-in to network" panel not fully functional for Web browsing

Not sure if I’m on-topic here or not, but here goes... I am responsible for the setup/configuration of WiFi routers in various restaurants and venues. We are simply using the built-in splash page functionality of the router to, upon connection, present a simple marketing message and daily special offer via an extremely simple, static external HTML page, rather than the login page that many venues present (airports, coffee shops, McDonalds, etc.).
After connecting to our SSID with a PC or mobile device, users are presented with a customized splash page where our venue’s latest “offer of the day” banner ad is presented, which links via a standard hyperlink out to a PDF coupon for them to redeem said offer. There are also a couple of other simple items on the page, such as a menu with links to other offers, and an embedded Google Map to the venue in question.
All seems to be OK on PCs and iPad/iPhone devices. However, we are running into a problem on Android devices – specifically, Android devices using newer/more recent versions of the Android OS.
The problem is that Google has made a change to newer versions of Android so that WiFi connection login/splash/confirmation pages no longer come up in the default Web browser of the phone/tablet in question. Instead, they seem to come up in some kind of built-in notification window simply titled “Sign-in to network” – it does not seem to be a full-blown, feature-compliant browser, but rather a panel of sorts built into Android. And when our basic, mainly static HTML page loads within this alert window, none of the standard HTML features (such as hyperlinks) seem to work. A window appears with the title “Sign-in to network”, and our splash page appears on within it, but the standard HTML hyperlink from our special offer graphic (to a PDF file) does not work. Clicking it has no effect. Our menu underneath that does not seem to open (it’s automatically collapsed on mobile devices), and none of the links within it work properly, and our embedded Google Map does not appear at all. It’s as if this alert window or whatever we call it does not support the basic features of HTML pages in any way.
There appears to be no way for me to programmatically force the Android client to “escape” from this proprietary panel and open up a page in their default browser. I’ve tried placing various forms of client and server side “push/redirect” code on the page in an effort to escape from this alert window and cue the default browser to open, with no luck. No matter what I do, it seems that they Android phones always load the splash page within a “sign-in to network” notification page rather than a browser, and that this notification panel is not fully functional for even basic HTML features such as <a> hyperlinks, javascript, or embedded items.
It’s possible that Android’s proprietary “sign-in to network” panel is apparently seeking some sort of acknowledgement of a successful "login" in order to proceed with any subsequent browsing. But if so, I don’t know what constitutes “acknowledgement”. Perhaps there some way to force a hidden form submission or link click programmatically to force the Android device to accept/acknowledge the connection just as if the user had logged in normally, so that we can then proceed to subsequent Web browsing?
Has anyone experienced this problem, or have any ideas as to whether there’s a work-around or coding-based solution to this difficulty?
Thanks very much for your help in advance.
UPDATE: I've been in touch with the Google developers of the sign-in panel... they indicated that "captive portal sign-in pages are displayed in an Android WebView, which uses much of the same code as the Chrome browser. The sign-in app is very simple, you can see all of its source code here.
One second after each navigation (including the initial page load), the app probes to see if the user has successfully signed into the network. This probe is done by fetching a URL that should give back a 204 response."
Based on this, I am making the assumption that until captive portal sign-in app probes to see if the user is successfully signed in, all other navigation and many other features on the page are disabled, and that the full functionality of the WebView panel is restored after a successful sign-in to the network. But if so how can I successfully "signal" to the sign-in app that the user is, in fact, signed in (or rather, that no sign is in necessary or desired)? Is there something programmatically that I can do in the page code to ensure this, so that the viewer can then proceed to normal Web navigation within the panel, and so forth?
Any insight into how this works from anyone here would be greatly appreciated!
Thanks!

Automatic, periodic HTTP requests

Hello
I have been searching for an app, which allows me to send HTTP requests automatically at a specified time once a day. The android device is always on and used to communicate with a robot through REST API. The operator presses HTTP requests shortcuts on the tablet.
Does anybody know of a way to achieve this simply?
Thanks in advance.

Categories

Resources