Comments (3)
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.
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.
🎉 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)
- npm ERR! engine Unsupported engine HOT 2
- Can't find a method to connect via BSSID HOT 1
- iot device's http server is not accessible on release build HOT 1
- connectionStatus() is returning 'false' when the Wi-Fi is connected. HOT 2
- Failed to build the app: No package name found. HOT 2
- Multiple commands produce libRNWifi.a HOT 1
- Import only works with path HOT 1
- Android 13 - Not returning correct error when password was wrong HOT 1
- Connection successful even if password provided is wrong? HOT 10
- iOS 17 WifiManager.getCurrentWifiSSID Error HOT 9
- Build error when upgrading to version 4.10.1 (latest). Previously 4.7.0 HOT 3
- CONTRIBUTION: Update EXAMPLE project HOT 3
- Build error after adding this package HOT 2
- Cannot connect to protected SSID on IOS when there's no internet HOT 3
- Error: Cannot detect SSID HOT 2
- v4.12.x produces a runtime error when `connectToProtectedSSID` is called on iOS HOT 6
- Could not determine the dependencies of task ':react-native-wifi-reborn:compileDebugJavaWithJavac'. HOT 2
- Android does not support dual band WIFI frequency bands HOT 1
- react-native-wifi-reborn not working in IOS HOT 8
- Get info of current Wifi HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-wifi-reborn.