Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Scanresult is always empty on Android 6.0

I have migrated my app to Android 6.0. But from in this migration, Wifi Scanresult is always empty. In some articles, I saw it's related new permission policy for location. So, I added use-permission ACCESS_COARSE_LOCATION and ACCESS_FINE_LOCATION in the manifast.

Additionally, I added some code requestPermissions, onRequestPermissionsResult and checked permission is granted successfully. But the scanresult is still empty.

After I enabled location setting manually, it works fine.

Is there any solution for this issue?

like image 375
jimmy Avatar asked Oct 28 '15 01:10

jimmy


1 Answers

Seems you have to enable location to get wifi ScanResult in Android 6.0

you may find more info here

like image 52
calvinfly Avatar answered Sep 30 '22 19:09

calvinfly