Skip to content

dont work #3

Description

@tonyleone1964
    public string StartSendLocation2Hololens()
    {
        string retval = "inizio";

        wifiApManager = new WifiApManager(MainActivity.MainActivityInstance);
                    if( wifiApManager.GetWifiApState() == Enums.WIFI_AP_STATE.WIFI_AP_STATE_ENABLED )
        {
            if (wifiApManager.IsWifiApEnabled())
            {
                List<ClientScanResult> x = (List<ClientScanResult>)wifiApManager.GetClientListAsync(true, 300).Result;

                if ( x.Count > 0 )
                {
                    retval = x[0].IPAddr;
                }
                else
                {
                    retval = "non ci sono devices collegati.";
                }

            }
            else
            {
                retval = "devi attivare hotspot !!";
            }
        }
        else
        {
            if(wifiApManager.GetWifiApState() == Enums.WIFI_AP_STATE.WIFI_AP_STATE_DISABLED )
                retval = "wifi disabled";
            else if (wifiApManager.GetWifiApState() == Enums.WIFI_AP_STATE.WIFI_AP_STATE_DISABLING)
                retval = "wifi disabling";
            else if (wifiApManager.GetWifiApState() == Enums.WIFI_AP_STATE.WIFI_AP_STATE_ENABLING)
                retval = "wifi enabling";
            else if (wifiApManager.GetWifiApState() == Enums.WIFI_AP_STATE.WIFI_AP_STATE_FAILED)
                retval = "wifi failed";
        }

        return retval;
    }

i cannot read any connected devices, wheres is the problem? android 10, xamarin.forms app, vs2019

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions