Comments (20)
@jainsuneet when you install from GitHub cordova plugin add https://github.com/cloudsurfers-it/wifiwizard2.git#plus
#{branch-name} to select a branch.
from wifiwizard2.
You can try connect to specify network knowing SSID and Pass. Try new method.
Maybe solve your problem.
@klich3 So I finally found the issue that why it was not able to connect to an open network. builder.setWpa2Passphrase(newPass);
is the standard wpa2 connection. If I disable this line then open network connection works. Other functions like disconnect and remove are not at all working for API >= 29.
from wifiwizard2.
Please install it with cordova plugin add https://github.com/tripflex/WifiWizard2
or ionic cordova plugin add https://github.com/tripflex/WifiWizard2
if you are using Ionic framework.
NPM release is older than GitHub master repository and there isn't Android 10 support on it.
from wifiwizard2.
You have one pull request for add new method for support Android 10. See it and, add it if you wanna...
Regards
from wifiwizard2.
Please install it with
cordova plugin add https://github.com/tripflex/WifiWizard2
orionic cordova plugin add https://github.com/tripflex/WifiWizard2
if you are using Ionic framework.NPM release is older than GitHub master repository and there isn't Android 10 support on it.
@klich3 @matteocappello94 I am using the current master version and I still get an error 'WiFi not available' on connect()
from wifiwizard2.
Please install it with
cordova plugin add https://github.com/tripflex/WifiWizard2
orionic cordova plugin add https://github.com/tripflex/WifiWizard2
if you are using Ionic framework.
NPM release is older than GitHub master repository and there isn't Android 10 support on it.@klich3 @matteocappello94 I am using the current master version and I still get an error 'WiFi not available' on connect()
Target Android 10, WifiWizard2 can't enable Wifi interface if it's disabled. To use it Wifi interface needs to be on.
https://developer.android.com/about/versions/10/privacy/changes#enable-disable-wifi
from wifiwizard2.
Please install it with
cordova plugin add https://github.com/tripflex/WifiWizard2
orionic cordova plugin add https://github.com/tripflex/WifiWizard2
if you are using Ionic framework.
NPM release is older than GitHub master repository and there isn't Android 10 support on it.@klich3 @matteocappello94 I am using the current master version and I still get an error 'WiFi not available' on connect()
Target Android 10, WifiWizard2 can't enable Wifi interface if it's disabled. To use it Wifi interface needs to be on.
https://developer.android.com/about/versions/10/privacy/changes#enable-disable-wifi
@matteocappello94 The Wifi interface is on. It works without any issue on targetsdk 28 but with 29 it is throwing error 'WiFi not available'. Event location access is also provided.
from wifiwizard2.
@jainsuneet I'm using this version https://github.com/cloudsurfers-it/WifiWizard2/tree/plus (fork of this master with some little improvement for my work) targeting API 29 and Cordova without any problems.
Post a snipped of your code please.
Are you sure you have updated correctly the plugin? try to remove it with cordova plugin rm wifiwizard2
and re-install it from this repository master or from my "plus" branch.
from wifiwizard2.
@matteocappello94 With your version I am getting below error while installing
cordova plugin add https://github.com/cloudsurfers-it/WifiWizard2/tree/plus
Failed to fetch plugin https://github.com/cloudsurfers-it/WifiWizard2/tree/plus via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
CordovaError: Error: npm: Command failed with exit code 1 Error output:
npm ERR! code ENOPACKAGEJSON
npm ERR! package.json Non-registry package missing package.json: https://github.com/cloudsurfers-it/WifiWizard2/tree/plus.
npm ERR! package.json npm can't find a package.json file in your current directory.
Here is the snippet of my code to connect to the WiFi
window.WifiWizard2.connect('SSID_Name', true).then((data) => {
alert(JSON.stringify('success'))
}).catch((error) => {
alert(JSON.stringify(error))
})
from wifiwizard2.
cordova plugin add https://github.com/cloudsurfers-it/wifiwizard2.git#plus
@matteocappello94 With your repo is also the same error 'WiFi not available'
from wifiwizard2.
@jainsuneet with Android Studio, you can debug with breakpoints .java class and methods of WifiWizard2 to verify where error occur.
Try to pass all args to the connect method, for example:
WifiWizard2.connect("NETWORK_NAME", true, "12345678", "WPA", false, true)
last argument withPattern it's only present on my "plus" branch. Let you list on Android 10 Wifi connection popup multiple networks, which are selected with RegEx pattern.
from wifiwizard2.
@jainsuneet LOCATION permission is granted, but location interface is enabled?
from wifiwizard2.
@jainsuneet LOCATION permission is granted, but location interface is enabled?
@matteocappello94 yes location interface is also enabled and also I cannot pass others args because the wifi is an open network.
from wifiwizard2.
@jainsuneet WIFI_NOT_ENABLED returned from verifyWifiEnabled() method of WifiWizard2.java
This method call wifiManager.isWifiEnabled() to check Wifi interface state. You have to debug this method with Android Studio to find your error on your device. If you are using Cordova, open Android project directly with Android Studio.
from wifiwizard2.
@jainsuneet WIFI_NOT_ENABLED returned from verifyWifiEnabled() method of WifiWizard2.java
This method call wifiManager.isWifiEnabled() to check Wifi interface state. You have to debug this method with Android Studio to find your error on your device. If you are using Cordova, open Android project directly with Android Studio.
@matteocappello94 I am getting 'WiFi not available', I can scan for the wifi ssids and it works but the connection is failing.
The not available is coming from
public void onUnavailable() {
super.onUnavailable();
Log.d(TAG, "WiFi not available");
callbackContext.error("WiFi not available");
}
which is within if(API_VERSION >= 29)
block
from wifiwizard2.
@jainsuneet appear popup window when you try to connect? If you can try with a Wifi network with password using method with all args like this:
WifiWizard2.connect("NETWORK_NAME", true, "12345678", "WPA", false, true)
This works for me without any problems.
I've to try to connect to an open network to check if the problem still also present with my app or not.
from wifiwizard2.
@jainsuneet appear popup window when you try to connect? If you can try with a Wifi network with password using method with all args like this:
WifiWizard2.connect("NETWORK_NAME", true, "12345678", "WPA", false, true)
This works for me without any problems.
I've to try to connect to an open network to check if the problem still also present with my app or not.
@matteocappello94 Yes now I tried with Password as well.
WifiWizard2.connect("NETWORK_NAME", true, "12345678", "WPA", false, true)
Still it throws the same error 'WiFi not available'. Even I am getting the popup with Wifi Network details but after that comes the error.
But if I connect like this WifiWizard2.connect("NETWORK_NAME", true, "12345678", "WPA", false)
then it works:
Is there any way that I can connect to an open WiFi? it will be really helpful.
from wifiwizard2.
You can try connect to specify network knowing SSID and Pass. Try new method.
Maybe solve your problem.
https://github.com/klich3/WifiWizard2#dev
from wifiwizard2.
You can try connect to specify network knowing SSID and Pass. Try new method.
Maybe solve your problem.
https://github.com/klich3/WifiWizard2#dev@klich3 So I finally found the issue that why it was not able to connect to an open network.
builder.setWpa2Passphrase(newPass);
is the standard wpa2 connection. If I disable this line then open network connection works. Other functions like disconnect and remove are not at all working for API >= 29.
Thanks, now for default is set as NONE for Open networks. Others Methods are Depricated on >= Api 29
from wifiwizard2.
You can try connect to specify network knowing SSID and Pass. Try new method.
Maybe solve your problem.
https://github.com/klich3/WifiWizard2#dev@klich3 So I finally found the issue that why it was not able to connect to an open network.
builder.setWpa2Passphrase(newPass);
is the standard wpa2 connection. If I disable this line then open network connection works. Other functions like disconnect and remove are not at all working for API >= 29.Thanks, now for default is set as NONE for Open networks. Others Methods are Depricated on >= Api 29
@klich3 With your latest commit on the dev branch I am getting lot of errors and the build is getting failed. Can you please help to resolve the issue.
> Task :app:compileDebugJavaWithJavac FAILED
App\src-cordova\platforms\android\app\src\main\java\android\wifiwizard2\WifiWizard2.java:2008: error: empty character literal
if(Algorithm.matches("/WPA3/gim") && PASS != '')
^
App\src-cordova\platforms\android\app\src\main\java\android\wifiwizard2\WifiWizard2.java:2008: error: unclosed character literal
if(Algorithm.matches("/WPA3/gim") && PASS != '')
^
App\src-cordova\platforms\android\app\src\main\java\android\wifiwizard2\WifiWizard2.java:2008: error: ';' expected
if(Algorithm.matches("/WPA3/gim") && PASS != '')
^
App\src-cordova\platforms\android\app\src\main\java\android\wifiwizard2\WifiWizard2.java:1988: error: 'try' without 'catch', 'finally' or resource declarations
try {
^
App\src-cordova\platforms\android\app\src\main\java\android\wifiwizard2\WifiWizard2.java:2056: error: 'catch' without 'try'
} catch (Exception e) {
^
App\src-cordova\platforms\android\app\src\main\java\android\wifiwizard2\WifiWizard2.java:2060: error: illegal start of type
}else{
^
App\src-cordova\platforms\android\app\src\main\java\android\wifiwizard2\WifiWizard2.java:2060: error: ';' expected
}else{
^
App\src-cordova\platforms\android\app\src\main\java\android\wifiwizard2\WifiWizard2.java:2061: error: <identifier> expected
callbackContext.error("SPECIFIER_INVALID_API_VERSION");
^
App\src-cordova\platforms\android\app\src\main\java\android\wifiwizard2\WifiWizard2.java:2061: error: illegal start of type
callbackContext.error("SPECIFIER_INVALID_API_VERSION");
^
App\src-cordova\platforms\android\app\src\main\java\android\wifiwizard2\WifiWizard2.java:2062: error: <identifier> expected
Log.d(TAG, "WifiWizard2: 211 - specifierConnection invalid Android API Version is below as needed.");
^
App\src-cordova\platforms\android\app\src\main\java\android\wifiwizard2\WifiWizard2.java:2062: error: <identifier> expected
Log.d(TAG, "WifiWizard2: 211 - specifierConnection invalid Android API Version is below as needed.");
^
App\src-cordova\platforms\android\app\src\main\java\android\wifiwizard2\WifiWizard2.java:2062: error: illegal start of type
Log.d(TAG, "WifiWizard2: 211 - specifierConnection invalid Android API Version is below as needed.");
^
App\src-cordova\platforms\android\app\src\main\java\android\wifiwizard2\WifiWizard2.java:2064: error: class, interface, or enum expected
}
^
13 errors
```
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/.
- 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.