Android Question Empty SSID/BSSID on Samsung devices with reflection

FrankBerra

Active Member
Licensed User
Hi there
i am using ABWifi to perform wifi scans every specified amount of time (for example every 10 min). It works perfectly but strangely it seems draining battery.
So i have decided to try alternative approaches and i use the following code to perform a scan:
B4X:
R.Target = R.GetContext
R.Target = R.RunMethod2("getSystemService", "wifi", "java.lang.String")
R.Target = R.RunMethod("startScan")


R.Target = R.GetContext
R.Target = R.RunMethod2("getSystemService", "wifi", "java.lang.String")
R.Target = R.RunMethod("getScanResults")
Log(R.RunMethod("toString"))
It works perfectly on Nexus5 (Lollipop) but on samsung devices it returns me info strings with fields SSID and BSSID empty.
(Example: http://developer.samsung.com/forum/thread/a/201/278581)

Is there any Guru that can help me to get out from this buggy situation?
How ABwifi can obtain that fields without problems?

Thanks in advance
 
Top