Cortar wifi actual y conectar a mi arduino

Buenos días, Necesito al abrir mi app y cortar la conexión wifi establecida y conectar automáticamente al wifi generado por mi Arduino con nombre de red y password fijas, y al salir que se corte del wifi de mi Arduino y se conecte al wifi anteriormente cortado. si alguien me puede ayudar se lo agradecería, un abrazo.

My wifi extension

was able to connect to SSIDs, however Google is restricting the system more and more, so for newer devices the ConnectSSID does not work anymore

The new Google API offers to connect to an SSID programmatically, however without internet connection

In case you like to sponsor and test the current beta version of the extension, please contact me by email. You can find my email address here Contact | Pura Vida Apps

I'm not sure, if this still is possible... I can take another look into the API documentation...

Taifun

Gracias por tu pronta respuesta Taifun, he probado da varias formas con tu extensión, y lo único que he logrado es que me salga una notificación cuando esta el GPS activado y no esta conectado al wifi correcto, como buscar y conectarse manualmente, pero no he logrado hacerlo automáticamente ya que al pedir la desconexión del wifi que ya esta establecido no lo corta y no se conecta al wifi local del Arduino, te envío un email para probar con la versión beta, desde ya un gran abrazo.

The new version16 of the wifi extension is now available here

The new version uses the new network connect api to programmatically connect to a ssid and creates a temporary network connection.

This API requires the permission WRITE_SETTIMGS.

Note: Creating a connection using this API does not provide an internet connection to the app or to the device!!!

Bypassing user approval
Once the user approves a network to connect to in response to a request from a specific app, the device stores the approval for the particular access point. If the app makes a specific request to connect to that access point again, the device skips the user approval phase and automatically connects to the network. If the user chooses to forget the network while connected to a network requested by the API, then this stored approval for that combination of app and network is removed, and any future request from the app must be approved by the user again.

Taifun