GithubHelp home page GithubHelp logo

Comments (5)

pwittchen avatar pwittchen commented on May 27, 2024

Thanks for reporting this.

If you observe different behavior on two different devices with the same code where the only difference is delay, then this is clearly hardware issue and library cannot do anything about this. It can be also Android OS issue, but still it's not related to the library.

Regards,
Piotr

from reactivenetwork.

seladev avatar seladev commented on May 27, 2024

Thanks for your quick answer

When i am listening to wifi changes with BroadcastReceiver i can see that the wifi connection event immediately.
This is the BroadcastReceiver:
receiver = new NetworkChangeReceiver(); IntentFilter intentFilter = new IntentFilter(); intentFilter.addAction(ConnectivityManager.CONNECTIVITY_ACTION); intentFilter.addAction(BluetoothAdapter.ACTION_STATE_CHANGED); registerReceiver(receiver, intentFilter); receiver.setConnectionListener(this);

This is the logs:
2021-04-21 11:37:21.943----- NetworkChangeReceiver ###### change network wifi enable = false --------------------
2021-04-21 11:37:49.358----- NetworkChangeReceiver ###### change network onReceive = android.net.conn.CONNECTIVITY_CHANGE --------------------
2021-04-21 11:37:49.363----- NetworkChangeReceiver ###### change network wifi enable = true --------------------
2021-04-21 11:37:49.370----- NetworkChangeReceiver ###### change network onReceive = android.net.conn.CONNECTIVITY_CHANGE --------------------
2021-04-21 11:37:49.404----- NetworkChangeReceiver ###### change network wifi enable = true --------------------
2021-04-21 11:38:19.325 Fragment -------------------- ###### change network = Connectivity{state=CONNECTED, detailedState=CONNECTED, type=1, subType=0, available=true, failover=false, roaming=false, typeName='WIFI', subTypeName='', reason='null', extraInfo=''} --------------------

from reactivenetwork.

pwittchen avatar pwittchen commented on May 27, 2024

In this receiver you are not using NetworkCapabilities.TRANSPORT_WIFI. I haven't tested library with this option. When you will use filter(ConnectivityPredicate.hasType(ConnectivityManager.TYPE_WIFI)) in the library, then you will get immediate result as well.

from reactivenetwork.

seladev avatar seladev commented on May 27, 2024

I tried this code filter(ConnectivityPredicate.hasType(ConnectivityManager.TYPE_WIFI))
It is the same behaviour - 30 sec delay

from reactivenetwork.

seladev avatar seladev commented on May 27, 2024

I also tried it with no filter - and It is the same behaviour - 30 sec delay

from reactivenetwork.

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.