I need some help. I try to develop an app which is setting up the wifi connection on an android device.
I try to use WifiWizard2 with this.wifiWizard2.connect(ssid, bindAll, password, algorithm, isHiddenSSID) but when i try the app on an Device (Android 12) i only get the Error: ERROR_ADDING_NETWORK.

Here is the code I use, i hope you can help me:

import { Component } from '@angular/core';

declare var WifiWizard2: any;

  selector: 'app-home',
  templateUrl: 'home.page.html',
  styleUrls: ['home.page.scss'],
export class HomePage {
  ssid = "ubntPOS";
  password = "6545A-UAPACL";
  info_txt = "";

  async getNetworks() {
    this.info_txt = "loading...";
    try {
      await WifiWizard2.timeout(4000);
      await WifiWizard2.connect(this.ssid,true,this.password,'WEP',false);
      this.info_txt = "";
    } catch (error) {
      this.info_txt = error;

For example:


does work properly and list all networks nearby.

Thank you!

I solved it.

For devices > Android 10 you have to use this

WifiWizard2.suggestConnection(SSID, password, algorithm, isHiddenSSID)

instead of:

WifiWizard2.connect(SSID, bindAll, password, algorithm, isHiddenSSID)

Also you have to run another WifiWizard2 version:

cordova plugin add https://github.com/matscav/WifiWizard2#dev

this is where i found the solutions

Hope this can help others aswell