For Example:
Android source code from WifiServiceImpl.java
left is from Android v22 (Lollipop), right is from Android v23 (Marshmallow)
Question: if I build an apk using compile/target sdk 22, and run my application on a phone running v23 and call the method getScanResults()
which one of those two methods gets called?
more info:
I have an app that manages WiFi, it does most of the work in the background, it works perfectly on Lollipop and lower, but in Marshmallow, it only works if I have my application in the foreground, because getScanResults()
returns an empty list if my app is in the background.