B4A Library Simple WIFI library Updated V. 3.07 09-05-2018

SimonatMSL

Member
Licensed User
SOLVED!!!!
Though there was no clue in demo program (nor in manifest) about adding any extra permission, but I found in forum that I have to ask permission:
B4X:
        If Not(rp.Check(rp.PERMISSION_ACCESS_FINE_LOCATION)) Then
            rp.CheckAndRequest(rp.PERMISSION_ACCESS_FINE_LOCATION)
            Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
            Log($"${Permission} status: ${rp.Check(rp.PERMISSION_ACCESS_FINE_LOCATION)}"$)
            pDoEvents
        End If
so everithing is working!
Yeah, the permissions thing changed with Android 6 so I cam across this in my apps on account of wanting to write to an SD Card. If you click on the List Permissions button at the bottom of the Logs window in the IDE it lists all permissions that need this treatment with an asterix.
 

kepler

Active Member
Licensed User
Good morning

Is the signal strength the real and actual frequency measure the phone is receiving, or is just a info variable sent by the cell tower?

Clear skies

Kepler
 

vhd_bgh

Member
Hi
I used this library on several devices and it works fine.
But on "sumsung galaxy j7" and other samsung device it doesn't work!!! ("updateWifiList" and then "ScanDone" function doesn't return anything)
Have you tested this on samsung devices?
 
Last edited:

Nishan15

New Member
isOnline is returning True but isOnlinePing is returning False.

I have tested with working internet then isOnline is true
tested with not working internet then isOnline is false
again I made the internet to work in the same function call but isOnline still remain in false and not changing back to true

B4X:
    StartServiceAt(Me, DateTime.Now + 2 * DateTime.TicksPerMinute, True)
    internetChk
internetChk:
    Dim phn As MLwifi
    Log(phn.isOnline)
    Log(phn.isOnlinePing)
   
    If phn.isOnlinePing Then
        Log(phn.isOnlinePing)
        is_Online = 1
    Else
        is_Online = 0
    End If
Also created a test project and find the screenshot for logs
 

Attachments

Last edited:

bruno.ionaldo

New Member
Hello, I would like to know if the MLwifi.connectWifiAP method has a priority list? Because I am trying to connect a network (saved) and I am not successful in trying to connect to the new network. Everything else worked perfectly.
 

vhd_bgh

Member
Hello, I would like to know if the MLwifi.connectWifiAP method has a priority list? Because I am trying to connect a network (saved) and I am not successful in trying to connect to the new network. Everything else worked perfectly.
I was able to switch well between saved networks perfectly
But my problem is "ScanDone" on "Sumsung" devices , It can't return any things!!! (This occurred only on "Sumsung" devices)
 
Hi @bruno.ionaldo and @vhd_bgh
I think the problem is explained here.
However it's hard for me to use the instead way. I would appreciate if you explain more or let me know simpler way.

I also ask @HotShoe and @bgsoft sincerely to update the library according to latest changes of Android. The library was perfect and useful.
Many thanks.
 
Hi @bruno.ionaldo and @vhd_bgh
I think the problem is explained here.
However it's hard for me to use the instead way. I would appreciate if you explain more or let me know simpler way.
Tonight I checked the MLWifi library code and compare deprecated methods by https://developer.android.com/reference/android/net/wifi/WifiManager
following functions won't work properly for mostly API>28

StartScan
UpdateWifiList
EnableWifi
ListSavedNetworks
removeWifiAP
isSavedWifiAP and isSavedWifiAP2
ConnectWifiAP and ConnectWifiAP2
disconnectWifiAP
SaveWifiAP and SaveWifiAP2
WifiStrength

functionally all important functions of MLWifi Library will no longer work properly ( for API>28)
 

vhd_bgh

Member
Tonight I checked the MLWifi library code and compare deprecated methods by https://developer.android.com/reference/android/net/wifi/WifiManager
following functions won't work properly for mostly API>28

StartScan
UpdateWifiList
EnableWifi
ListSavedNetworks
removeWifiAP
isSavedWifiAP and isSavedWifiAP2
ConnectWifiAP and ConnectWifiAP2
disconnectWifiAP
SaveWifiAP and SaveWifiAP2
WifiStrength

functionally all important functions of MLWifi Library will no longer work properly ( for API>28)
Special thanks from Vahid to @mohammad javad :)
But... I have used this library in applications and so far it has had problems with Samsung devices
What do you think is the solution?
 
Special thanks from Vahid to @mohammad javad :)
But... I have used this library in applications and so far it has had problems with Samsung devices
What do you think is the solution?
I’m not professional but I think the most important problem is some classes which are used in MLWifi library are deprecated in android 10, no matter which device is used. I tested my project on galaxy s6 ( android 7 I think) and it’s ok
 

dd1

Member
Hi everyone
Is it possible to have a mini example on how to use this library?
Sorry but I'm a beginner and I'm not sure how to call the available functions
 
Top