Search code examples
javascripthtmlmobile-safarimobile-website

How to find mobile WiFi settings using browser


Is there any way to get mobile connectivity settings from a website? I want to check connection type (3G\4G\WiFi) and if this is WiFi - what security method is it using?

Is this possible? and how?

Edit: If it's not possible, can I "pop out" the WiFi setting screen if the user confirms it using web?


Solution

  • You can use Network Information API.

    var connection = navigator.connection || navigator.mozConnection || navigator.webkitConnection;
    var type = connection.type;
    

    where type can be one of bluetooth, cellular, ethernet, none, wifi, wimax, other, unknown.

    Unfortunately support is very limited.