Comments (4)
Ok, so to wrap everything up, add the following script in your js file like so:
document.addEventListener("deviceready", function() {
WifiWizard2.scan().then( function( results ){
// Whatever you want with results
console.log(results);
});
}, false);
I'd really like to see a warning in the README
file that says that the code should be wrapped inside the deviceready
event listener like so:
document.addEventListener("deviceready", function() { // The code here }, false);
and also an example for listing the wifi networks like so:
console.log(results);
Very good work on supporting this library! Was very happy to see it at very but a little more upset when I couldn't get it to work, so that's why I suggested adding examples to your README
file.
from wifiwizard2.
I'm debugging the app and it seems like WifiWizard2 is not defined
in the cordova.js
file. Any ideas on this? The WifiWizard2.js
file is here and it's available in the cordova_plugins.js
file.
from wifiwizard2.
Ok, I made it work but after changing the code to this:
WifiWizard2.scan().then( function( results ){
console.log( 'Found networks', results );
})
However, I need to run it from the console in Chrome. Should I put the async
tag on the <script>
tag containing the js files?
The readme.md
file doesn't help at all when it comes to using this plugin. Please add an example to each function, it would be very very helpful! Thanks!
from wifiwizard2.
@touficbatache there is a link to a complete demo meteor project using this library, the 3.0.0 branch readme is completely different from master branch (ill be merging it soon since it appears 3.0.0 may be more stable now than the original one).
And yes, you're correct, you can't run any Cordova related API calls until deviceready
, this is true for anything Cordova related:
https://cordova.apache.org/docs/en/latest/cordova/events/events.html#deviceready
i guess if you're trying to immediately invoke on the page loading (which I personally don't really ever do, it's always triggered by some kind action in the app), but I will add something in the readme stating this
from wifiwizard2.
Related Issues (20)
- wifiWizard2.scan() returns error "Uncaught (in promise) SCAN_FAILED" HOT 3
- Is WifiWizard2 still maintained? HOT 6
- Android 10 ( 29 ) is not supported - Connect to network, enable, disable and more.. HOT 45
- Empty Array in com.apple.developer.networking.networkextension prevents Apple Upload HOT 8
- I have a working version running on Android 10. I modified it by forking https://github.com/ViggoChavine/WifiWizard2 who already started work for API 29 and i added on top of it for my app feel free to use as a base or as is: https://github.com/VijayVaveHealth/WifiWizard2/.
- Android - SDK android-targetSdkVersion <= 28 HOT 20
- Consulting for this package? HOT 3
- Android 8 will fail when the phone is the first time(new) connect to the wifi network from the app directly.
- Android 10: online/offline problems via wifi plugin HOT 1
- when will the new version that support android 10 be released? HOT 1
- Version 3.3.0 for Android 10+ HOT 13
- Read saved wifi password
- Error: Plugin WifiWizard2 does not respond to method call add. Ensure plugin method exists and uses @objc in its declaration HOT 2
- ERROR_SETWIFIENABLED HOT 1
- Receive `null` from iOSConnectNetwork() when Cellular is enabled and Network is Saved HOT 2
- Unable to install the latest version of WifiWizard2 [Version 3.3.0] in Ionic Project
- Wifi with No Internet Disconnect after some time HOT 1
- internet access outside app
- How i connect to WIFI that requires username and passwoord?
- IOS 16 not get automatically SSID also not show subnet address and ipaddress
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wifiwizard2.