How to Obtain a Network List in monaca

Asked 2 years ago, Updated 2 years ago, 72 views

I am currently thinking of developing an app with monaca.

Obtain a list of wireless LANs that can be connected from your smartphone using the app. After selecting a network, enter your password and click
You can connect to that network.
I would like to create something like that.

In the monaca documentation,

https://docs.monaca.io/ja/reference/cordova_6.2/network-information/

There was a plug-in to get network information, but
I wonder if wifi is connected to my smartphone right now.
That's the only information I can get.

If you click the wifi icon in windows or mac,
The image is the same as the list of networks flying around it.

Is it possible to implement these functions?
Thank you for your cooperation.

monaca

2022-09-30 21:17

1 Answers

I use a custom plug-in, but
https://github.com/parsonsmatt/WifiWizard
I could have used .

I only checked on Android, but

javascript:

function checkWifi(){
        WifiWizard.listNetworks(function(list){
            alert(JSON.stringify(list);
        }, function(error){
            alert(error);
        });
    }

HTML:

<button onclick="checkWifi();">Check Wifi</button>

provides a list of SSIDs.For some reason, there was a double quote in the SSID.


2022-09-30 21:17

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.