Skip to content

JWifiManager : Scan returns nothing #529

@HuguesDug

Description

@HuguesDug

Hello,

Here attached a bit of code that just return constantly 0 network found.

Is this component really able to scan the available wifi networks ?


procedure TAndroidModule1.AndroidModule1Show(Sender: TObject);
begin
Timer1.enabled:=true;
Textview1.Text:='';
end;

procedure TAndroidModule1.AndroidModule1JNIPrompt(Sender: TObject);
begin
WifiManager.SetWifiEnabled(true);

if WifiManager.NeedWriteSettingsPermission() then
WifiManager.RequestWriteSettingsPermission();

WifiManager.init;
end;

procedure TAndroidModule1.Button1Click(Sender: TObject);
begin
AndroidModule1.Close;
end;

procedure TAndroidModule1.Timer1Timer(Sender: TObject);
Var i:Integer;
begin
TextView1.Append('Scanning...'+#13+#10);
Nets:=WifiManager.Scan;
TextView1.Append('Found '+IntToStr(Length(Nets))+#13+#10);
For i:=low(Nets) to High(Nets) do
begin
TextView1.Append(Nets[i]+#13+#10);
TextView1.Append(WifiManager.GetCapabilities(i)+#13+#10);
end;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions