Site icon Embarcadero RAD Studio, Delphi, & C++Builder Blogs

Wi-Fi management from applications using C++Builder

Author: h.mohri

Using C++Builder 10.2 Tokyo, explain how to switch Wi-Fi on Android.

Manage Wi-Fi switching using JWifiManager

I use di_JWifiManager which wrapped WifiManager.
di_JWifiManager is the Delphi interface.
Set the variable. _di_JWifiManager f_WifiManager; use it like this.

Required headers

Header file for using WifiManager.

[crayon-663b6f12cfa76850770754/]

Display design

It is a design for displaying on Android.


TEditTSwitchTTimerTLabel, was placed.

 

When the main form creation

Create _di_JWifiManager using TJWifiManager.

[crayon-663b6f12cfa7f393719429/]

Monitor Wi-Fi status at Timer1 event.

[crayon-663b6f12cfaa0019331635/]

When you tap the Switch1.

Change the Wi-Fi status when tapping the Switch1.
This uses the setWifiEnabled() function.

[crayon-663b6f12cfaa2179782232/]

 

https://github.com/mojeld/cpp_builder_firemonkey_wifi

 

Exit mobile version