devstepbcn / react-native-android-wifi

A react-native module for viewing and connecting to Wifi networks on Android devices.
ISC License
212 stars 121 forks source link

need to able location in order to use wifi #78

Open Martlohmus12 opened 5 years ago

Martlohmus12 commented 5 years ago

I don't understand why I have to enable location manually or programatically in order to use the wifi functionality.

"react-native": "^0.59.0", Gradlew 3 targetSdkVersion 27 compileSdkVersion 28

bondparkerbond commented 5 years ago

This is an Android Platform requirement as knowing what WiFi you are connected to and especially knowing what WiFi networks are available in the area can be used to determine your geographic location to a pretty high degree of precision. As such, getting WiFi info requires either the COARSE or FINE location permission.

yusuf987 commented 5 years ago

I am also not able to understand this, it doesn't make any sense to me why would I share my location just for accessing wifi

i have to make my users understand this why i am asking their location can somebody please give some valid reason

bondparkerbond commented 5 years ago

If I know what Wifi networks are near you, I can determine where you are. That is the reason location permissions are needed. This is a Google/Android thing, and you either need to request the permission or have users manually connect to wifi for you.