It wraps this Github project. It prints the connected clients to the B4A log. We can panel beat it a bit if I know what info you would like to have returned to the B4A project. I have tested it between my tablet (client) and cell phone (hotspot) and it seems to work 100%.
Note the permissions added to the B4A manifest file
Sample Code:
You can download and test any posting of mine in this thread but if you want to use it then you need to
Note the permissions added to the B4A manifest file
B4X:
AddPermission(android.permission.CHANGE_WIFI_STATE)
AddPermission(android.permission.ACCESS_WIFI_STATE)
AddPermission(android.permission.INTERNET)
Sample Code:
B4X:
#Region Project Attributes
#ApplicationLabel: HotSpot
#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.
Dim t As Timer
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim hs As HotSpot
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
'Activity.LoadLayout("Layout1")
t.Initialize("t", 2000)
hs.Initialize("")
End Sub
Sub Activity_Resume
t.Enabled = True
End Sub
Sub Activity_Pause (UserClosed As Boolean)
t.Enabled = False
End Sub
Sub t_tick
hs.scan
End Sub
You can download and test any posting of mine in this thread but if you want to use it then you need to
Attachments
Last edited: