Comments (5)
Hi @Ankit0080,
Under the hood library uses broadcast receivers for detecting application idle state or network change depending on the Android version installed on the device. If your activity is using one of these receivers, they may interfere with this library. You should decide if you want to use this library or custom receivers to monitor device state. Another solution, may be creating custom implementation of the network observing strategies for the library and override default behavior. It's possible, but you will loose most of the functionalities of the library. It all depends on your specific case and the goal you want to achieve.
Regards,
Piotr
from reactivenetwork.
@pwittchen I am using broadcast receivers for some other task not for Connectivity and that broadcast event stopped firing after using library SO is there any way around.?
from reactivenetwork.
It's strange. I have never heard of such issues before. My only guess is the fact that broadcast receivers inside the library cannot work with your custom broadcast receivers, but I'm not sure about that.
Possible workarounds (I'm not sure if they will work, it's just my guess):
- avoid using observing network connectivity and use observing internet connectivity instead
- implement custom network observing strategy, but it's hard for me to say how to do that for your use case
- force usage of
LollipopNetworkObservingStrategy
in your app and set min sdk version for Android Lollipop (this strategy does not use any broadcast receivers - broadcast receivers are used byMarshmallowNetworkObservingStrategy
andPreLollipopNetworkObservingStrategy
) - you can use methodobserveNetworkConnectivity(context, strategy)
to do that - this will limit users of your app for only those with newer Android version, but it may help to fix this issue
from reactivenetwork.
@pwittchen ok thanks for your support i will follow these steps you mentioned to sort out the issue
from reactivenetwork.
@pwittchen I tried your suggestion they aren't working and then i removed the code from same activity where i am using broadcast receiver and guess what broadcast receiver started working so i guess there is conflict between this library and Custom Broadcast receiver.
from reactivenetwork.
Related Issues (20)
- "NetworkCallback was already unregistered" if re-using Observable HOT 4
- Migrate CI from Travis to GitHub Actions
- connection speed HOT 5
- fix error prone config for the RxJava2.x branch after bumping its version HOT 1
- Release 4.0.0-rx3 HOT 11
- [Question] What is a reason to use http instead of https protocol in your library internal requests? HOT 1
- How know which connection type is better ? HOT 1
- NetworkInfo.State Deprecated HOT 1
- Rx Java 3 support
- Google pixel wifi change event is received in 30 sec delay HOT 5
- java.lang.IllegalArgumentException: Too many NetworkRequests filed in Android Nougat(7.1.1). HOT 7
- MarshmallowNetworkObservingStrategy.java line 80 HOT 4
- isConnectedToInternet always false
- Internet connectivity issue: Could not establish connection with WalledGardenStrategy HOT 1
- ReactiveNetwork(RN) usage of IPv6 and DNS results prioritization HOT 1
- Will there be a version for Kotlin Flow ? HOT 2
- Fix Robolectric tests HOT 1
- How to check Internet Connection in Background continuously even if App is Running or Not/Closed.. HOT 1
- Th
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 reactivenetwork.