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_LOCATION
and ACCESS_FINE_LOCATION
in the manifest.
In addition, I added the code requestPermissions
, onRequestPermissionsResult
and 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