I needed to verify the Wifi that the app is connected and I didn´t find the Cordova plugin in ngCordova list, so I found the WifiWizard plugin that had all that I needed and used it inside the app.
Below, I put the steps that I did to get it working:
- ionic start WifiWizard blank
- cd WifiWizard
- ionic platform add android
- cordova plugin add WifiWizard
- ionic run android -l
.service('WifiService', function($ionicPlatform) { var service = this; $ionicPlatform.ready(function() { WifiWizard.listNetworks(successNetwork, failNetwork); })
var successNetwork = function(response) {
console.log("successNetwork");
} var failNetwork = functionresponse {
console.log("failNetwork");
} });
We can also call the plugin using:window.WifiWizard.listNetworks()
Nenhum comentário:
Postar um comentário