Author: h.mohri
Using C++Builder 10.2 Tokyo, explain how to switch Wi-Fi on Android.
Table of Contents
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-681c5201b3f3e474226771/]
Display design
It is a design for displaying on Android.
TEdit, TSwitch, TTimer, TLabel, was placed.
When the main form creation
Create _di_JWifiManager using TJWifiManager.
[crayon-681c5201b3f46913994462/]
Monitor Wi-Fi status at Timer1 event.
[crayon-681c5201b3f48143862138/]
When you tap the Switch1.
Change the Wi-Fi status when tapping the Switch1.
This uses the setWifiEnabled() function.
[crayon-681c5201b3f49295082131/]
https://github.com/mojeld/cpp_builder_firemonkey_wifi