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

Fix forceWifi for Android 6.0.1 devices #79

Closed bondparkerbond closed 5 years ago

bondparkerbond commented 5 years ago

ACTION_MANAGE_WRITE_SETTINGS(AMWS) is only needed to forceWifi on Android 6.0.0, this was fixed in Android 6.0.1 and later. We are already not requesting the AMWS permission on Android 7+. I now have a Samsung device on Android 6.0.1 so I was able to verify that the following fix works on 6.0.1, but will leave 6.0.0 functionality unchanged. Android 7+ functionality is also unaffected by this change, and if we are unable to positively identify if an Android 6 device is on 6.0.1 or not we will default to requesting AMWS.

bondparkerbond commented 5 years ago

Once this gets approved we'll need to bump the version and republish.

devstepbcn commented 5 years ago

Thank you @bondparkerbond !