Git Product home page Git Product logo

Comments (3)

eliaslecomte avatar eliaslecomte commented on July 20, 2024

Have you gone through the readme? https://github.com/JuanSeBestia/react-native-wifi-reborn#access_fine_location-permission

You need to add to your AndroidManifest as well. The library doesn't do this for you because you need to add the permission but also check for this permission. You also need location before connecting to a wifi network for example.

from react-native-wifi-reborn.

cashc avatar cashc commented on July 20, 2024

yes, I have followed the Android steps in the readme and have added the line
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
to the AndroidManifest.xml file. The linter error still appears though.

Idk if this matter but these are my versions:

Gradle 6.0.1
------------------------------------------------------------
Build time:   2019-11-18 20:25:01 UTC

Kotlin:       1.3.50
Groovy:       2.5.8
Ant:          Apache Ant(TM) version 1.10.7 compiled on September 1 2019
JVM:          1.8.0_202-ea (Oracle Corporation 25.202-b03)
OS:           Mac OS X 10.15.4 x86_64

Also, I added the ACCESS_FINE_LOCATION permission to your react-native-wifi-reborn project manifest file and then ran ./gradlew lint and now it throws this error that has a little more detailed description:

/Users/cashc/my-project/node_modules/react-native-wifi-reborn/android/src/main/java/com/reactlibrary/rnwifi/RNWifiModule.java:285: Error: Call requires permission which may be rejected by user: code should explicitly check to see if permission is available (with checkPermission) or explicitly handle a potential SecurityException [MissingPermission]
          final List<WifiConfiguration> mWifiConfigList = wifi.getConfiguredNetworks();
                                                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This makes me think it's complaining about the code in RNWifiModule.java, not the way the permissions are setup in the manifest.

Error: Call requires permission which may be rejected by user: code should explicitly check to see if permission is available (with checkPermission) or explicitly handle a potential SecurityException

from react-native-wifi-reborn.

JuanSeBestia avatar JuanSeBestia commented on July 20, 2024

🎉 This issue has been resolved in version 4.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

from react-native-wifi-reborn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.