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-67688d6389517295505065/]

Display design

It is a design for displaying on Android.


TEditTSwitchTTimerTLabel, was placed.

 

When the main form creation

Create _di_JWifiManager using TJWifiManager.

[crayon-67688d6389521048968238/]

Monitor Wi-Fi status at Timer1 event.

[crayon-67688d6389523121877578/]

When you tap the Switch1.

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

[crayon-67688d6389525168072753/]

 

https://github.com/mojeld/cpp_builder_firemonkey_wifi

 

Exit mobile version