Is it possible to detect the Android portal browser in real time?

I have a portable portal that with Android 5.0+ Lollipop launches in the Android Captive Portal Browser, and not in the default browser.

I need to somehow determine if they are in a portable browser browser (as opposed to a regular web browser), and if so, show other content.

Is it possible, by looking at the User Agent or Javascript, to determine if they are in the Captive Portal Browser window? I looked at user agents on my Android 5.1 device, but I don't see anything to distinguish them:

PICTURE PORTAL:

Mozilla/5.0 (Linux; Android 5.1; Elite 5 Build/LMY47D) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/39.0.0.0 Mobile Safari/537.36

GOOGLE REGULAR CHROME:

Mozilla/5.0 (Linux; Android 5.1; Elite 5 Build/LMY47D) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.94 Mobile Safari/537.36

There is a slight difference in version numbers, but this seems inconsistent in versions of Android / Chrome and is not a reliable way to determine browser type.

? .

+4
1

Modernizr, Fetch API , Google Chrome Firefox .., .

+2

Source: https://habr.com/ru/post/1610273/


All Articles