Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android should add this info for accessing valid SSID instead of unknown #58

Open
nickwanhere opened this issue Jul 10, 2018 · 2 comments

Comments

@nickwanhere
Copy link

async function requestPermission() {

    try {
      const granted = await PermissionsAndroid.request(
        PermissionsAndroid.PERMISSIONS.ACCESS_FINE_LOCATION,
        {
          'title': 'Wifi networks',
          'message': 'We need your permission in order to find wifi networks'
        }
      )
      if (granted === PermissionsAndroid.RESULTS.GRANTED) {
        console.log("Thank you for your permission! :)");
      } else {
        console.log("You will not able to retrieve wifi available networks list");
      }
    } catch (err) {
      console.warn(err)
    }
}

And add these to AndroidManifest.xml

    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
@tmkst2607
Copy link

tmkst2607 commented Apr 5, 2019

@nick Wan
Please add more a line bellow to AndroidManifest.xml if you request with ACCESS_FINE_LOCATION:
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
OR
Change request ACCESS_FINE_LOCATION to ACCESS_COARSE_LOCATION when call request permission
It's help

@oshimayoan
Copy link

Anyone care to add this to the README?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants