Android Question Simple WIFI library V. 3.07

Discussion in 'Android Questions' started by labcold, Jul 12, 2019.

  1. labcold

    labcold Member Licensed User

    I am using this very well but I have come across a problem. For a particular client they want to stop people adding wifi APs to their devices. What I want to do is to do a check on startup that there are only the 'acceptable' APs in the list.
    Using the library MLWifi and MLScan I can list the saved AP's and disconnect them, but I cannot seem to delete them from the list.
    I use the code below to test this out.
    I get a list of all the saved APs but mls.removeWifiAP(nid) always returns False.
    I am running Android 7.7.1 and have already got the permissions:
    I have tried the removeWifiAP on both MLwifi and MLscan and neither actually remove the stored APs.
    Am I missing something or is it a device based issue?

    Private mlw As MLwifi
    Private mls As MLScan
    Dim wl As List = mls.listSavedNetworks
    For Each item As String In wl
    Dim lb() As String = Regex.Split(",",item)
    If IsNumber(lb(2)) Then
    Dim nid As Int
    End If
  2. Erel

    Erel Administrator Staff Member Licensed User

    labcold likes this.
  3. DonManfred

    DonManfred Expert Licensed User

    Is the AP created by your app? It should be possible to remove if your app did created the AP.

    If not than you can not delete it. Or only using the owner app.
    labcold likes this.
  4. labcold

    labcold Member Licensed User

    Thank you for the quick reply :D
    I will be running this as an owner app but as I am debugging at the moment I haven't set this up. I will try this and see if it works :)
  5. labcold

    labcold Member Licensed User

    OK thank you both very much - setting the owner app did the trick and I can do all I need :D
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice