Git Product home page Git Product logo

Comments (5)

JulesCourtois avatar JulesCourtois commented on July 20, 2024

I've found the solution.

This was caused by Android behaviour which only allows an app to modify a network state if it was added by said app and not by another app or the user.

Wi-Fi and Networking Changes
This release introduces the following behavior changes to the Wi-Fi and networking APIs.
Your apps can now change the state of WifiConfiguration objects only if you created these objects. You are not permitted to modify or delete WifiConfiguration objects created by the user or by other apps.
Previously, if an app forced the device to connect to a specific Wi-Fi network by using enableNetwork() with the disableAllOthers=true setting, the device disconnected from other networks such as cellular data. In This release, the device no longer disconnects from such other networks. If your app’s targetSdkVersion is “20” or lower, it is pinned to the selected Wi-Fi network. If your app’s targetSdkVersion is “21” or higher, use the multinetwork APIs (such as openConnection(), bindSocket(), and the new bindProcessToNetwork() method) to ensure that its network traffic is sent on the selected network.

Source

I had added my IoT Network manually so it wouldn't let me connect.
I believe this can be bypassed through code, might go around and make a pull request someday.

from react-native-wifi-reborn.

ammarkhan967 avatar ammarkhan967 commented on July 20, 2024

@JulesCourtois
we are facing the same problem with android 10. can you please share the solution???

from react-native-wifi-reborn.

JulesCourtois avatar JulesCourtois commented on July 20, 2024

@ammarkhan967
Try forgetting the network before connecting again.

from react-native-wifi-reborn.

adnan1naeem avatar adnan1naeem commented on July 20, 2024

@ammarkhan967
Try forgetting the network before connecting again.

@JulesCourtois The solution is not working .Can you please sugggest any method that could work as its's alternate or some other solution which could work in android 10

from react-native-wifi-reborn.

eliaslecomte avatar eliaslecomte commented on July 20, 2024

Actually if you are using the latest version you also have to target Android 10. I've updated the sample (to also target android 10) here: #105. If you still target Android 9, it will not be possible to connect to wifi networks on Android 10.

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.