I ported my application to Android 6.0. But from this migration, Wifi Scanresult is always empty. In some articles, I saw that this is due to the new location permission policy. So, I added a use-permit ACCESS_COARSE_LOCATIONand ACCESS_FINE_LOCATIONin the manifest.
In addition, I added the code requestPermissions, onRequestPermissionsResultand the verified permission was successfully completed. But scanresult is still empty.
After I turned on the location setting manually, it works fine.
Is there any solution for this problem?
source
share