WiFi getScanResults returns an empty list if GPS is off. (Android 6.0.1)

走远了吗. 提交于 2019-11-30 15:16:25

You must declare ACCESS_COARSE_LOCATION or ACCESS_FINE_LOCATION. A location permission is required because Bluetooth scans can be used to gather information about the location of the user.

This information may come from the user's own devices

So you must give that permission and on the GPS for Bluetooth devices.

Google, Apple, Microsoft, et al, build, maintain, and sell databases of Wi-Fi routers and their locations. By requiring you to enable location functionality when scanning nearby WiFi networks, they acquire and update these data.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!