Open Ionitron opened 4 years ago
Original request: https://github.com/ionic-team/capacitor/issues/1897
@AE1NS I added it to the list of existing solutions, but these proposals are for Capacitor plugins, not Cordova plugins.
Next one: https://github.com/digaus/capacitor-wifi Or better this fork with some more updates: https://github.com/HalleyAssist/capacitor-wifi
Install:
npm i capacitor-wifi@git://github.com/HalleyAssist/capacitor-wifi.git
Update MainActivity.java in Android:
import com.digaus.capwifi.Wifi; <-- add
this.init(savedInstanceState, new ArrayList<Class<? extends Plugin>>() {{
...
add(Wifi.class); <-- add
}});
Usage:
import { Plugins } from '@capacitor/core';
const { Wifi } = Plugins;
...
// i.e.
Wifi.connect({ ssid: 'My wifi network ssid' }).then(() => {
console.log('connected');
});
@digaus Any interest in joining the Capacitor community with your Wi-Fi plugin?
@digaus Any interest in joining the Capacitor community with your Wi-Fi plugin?
It's basically copy paste from WifiWizard2
Also does not work sometimes on all Android version. Currently have no time and resources to look into that. :/
@HalleyAssist you made some more commits in your fork, maybe its more stable?
WifiWizard2 is Apache-2.0 licensed, which makes it difficult to create legal derivative works (I'm not a lawyer). The Capacitor community generally prefers the MIT license which is much more permissive.
Hey everyone.
I am about to get back to my Wifi Plugin and do a rewrite with the newest version of capacitor.
Unfortunately I do only own the latest iOS / Android Versions. Is there someone willing to implement and test the parts for the older versions?
Have started implementing:
https://github.com/digaus/community-capacitor-wifi
Already done are getIP()
and getSSID()
for iOS, Android and Electron (not 100% tested)
Still working on this project?
Still working on this project?
Yes but no official releases so far. It should work as is. Recently fixed some issues with iOS.
Just run npm install on my master and it should work.
You can add your plugin to awesome-capacitor if that is useful please take time to star the repo :)
@digaus plugin https://github.com/digaus/community-capacitor-wifi worked for our case.
Plugin Request
Name: WiFi Package:
@capacitor-community/wifi
Platform(s)
Android, iOS
Existing Solutions
https://github.com/digaus/capacitor-wifi https://github.com/sushichop/cordova-plugin-wifi-manager https://github.com/tripflex/WifiWizard2
Description