#Region Project Attributes
#ApplicationLabel: B4A Example
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#End Region
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Private xui As XUI
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
Private B4XFloatTextField1 As B4XFloatTextField
Private Button1 As Button
Private Button2 As Button
Dim wifi As MLwifi
Dim rp As RuntimePermissions
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Layout")
rp.CheckAndRequest(rp.PERMISSION_ACCESS_FINE_LOCATION)
rp.CheckAndRequest(rp.PERMISSION_ACCESS_COARSE_LOCATION)
wifi.debug = True
End Sub
Sub Activity_Resume
End Sub
Sub Activity_PermissionResult (Permission As String, Result As Boolean)
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub Button1_Click
'NO TOAST IN ANDROID 10
Log(wifi.isWifiConnectedQ) '<== False
Log(wifi.isWifiConnected) '<== False
If wifi.isWifiConnected = True Then
ToastMessageShow("WiFi Connected: " & wifi.isWifiConnected, True)
End If
End Sub