02 Apr 2020
- updated project dependencies
- update gradle version
- fixed bug #422 and #415 (changed port for default host for checking internet connectivity from https to http)
12 Mar 2020
- updated project dependencies
- fixed bug #379 (changed default host protocol to https in `InternetObservingSettings)
25 Aug 2019
- added new method for creating
HttpsUrlConnection(HttpsURLConnection createHttpsUrlConnection(final String host, final int port, final int timeoutInMs)) inWalledGardenInternetObservingStrategy, appropriate method is chosen automatically basing on the protocol (httporhttps) - solves #323 - note: version 3.0.5 was skipped due to sonatype issues
7 Aug 2019
- fixed bug #330 - State CONNECTED sometimes is not returned when wifi is turned off while having mobile internet connection (Android 9)
- fixed bug #307 - Mobile data connection is not active
- switched default protocol from
httptohttpsinWalledGardenInternetObservingStrategy- solves #323 - added nopen for static code analysis - solves #322
- bumped project dependencies
- updated docs
13 May 2019
- migrated:
com.android.support:support-annotations:28.0.0->androidx.annotation:annotation:1.0.2- PR #332 - migrated
com.android.support:appcompat-v7:28.0.0->androidx.appcompat:appcompat:1.0.2- PR #332 - updated Kotlin to
1.3.31- PR #332 - updated RxJava to
2.2.8- PR #332 - updated RxAndroid
2.1.1- PR #332 - added
release.shscript to make release process more automated
27 Dec 2018
- bumped project dependencies: https://github.com/pwittchen/ReactiveNetwork/commit/d486f80459c2d52f8012af0c707528ebc972b4a2
1 Dec 2018
- Fixed unserialized access to subject on Marshmallow - https://github.com/pwittchen/ReactiveNetwork/commit/91b676e726071b2d77b1e26a35dbcafa0fac7b32 by @aperfilyev
24 Sep 2018
- updated project dependencies
- updated target SDK
- simplified codecov.io configuration
- documented usage of
usesClearTextTrafficsetting and added it to the sample apps - added possibility to configure HTTP response code via
httpResponse(int)method inInternetObservingSettingsclass (API-breaking changes - a few method signatures were changed) - it works forWalledGardenInternetObservingStrategyonly - updated builder in
InternetObservingSettings- removed unused methods
5 Aug 2018
- bumped project dependencies - PR #292, Commit: https://github.com/pwittchen/ReactiveNetwork/commit/7e4cd4b7e39931d6cceeb0b674ccb506d38f91e4
- RxJava: 2.1.16 -> 2.2.0
- Mockito Core: 2.19.1 -> 2.21.0
- NullAway: 0.4.7 -> 0.5.1
- Robolectric: 3.1.2 -> 4.0-alpha-3
20 Jul 2018
- bumped project dependencies -> RxJava: https://github.com/pwittchen/ReactiveNetwork/commit/1d1a301a72d0128548ccf4b9b2cef24c07d38118, others: https://github.com/pwittchen/ReactiveNetwork/commit/597dc03c1c18fb73849c7b0bc4a52d46524bd02b
- refactored
Connectivityclass to better builder pattern to improve code consistency (breaking API of theConnectivityclass) - PR #283 - improved unit tests coverage - PR #287
24 Jun 2018
- fixed docs in https://github.com/pwittchen/ReactiveNetwork/commit/76ab2b23210207d83250da5d8fd0cd6e275e3f08 after reporting problem in #276 (returning false-positive connectivity results in one edge-case)
- updated project dependencies - PR #269, commit 02449af2f38ac463e1aa8824beee46ea823fd83b
- refactored
ReactiveNetworkclass with Builder pattern - PR #279 - removed the following methods from the
ReactiveNetworkclass:
Observable<Boolean> observeInternetConnectivity(int interval, String host, int port, int timeout)
Observable<Boolean> observeInternetConnectivity(int initialIntervalInMs, int intervalInMs, String host, int port, int timeout)
Observable<Boolean> observeInternetConnectivity(final int initialIntervalInMs, final int intervalInMs, final String host, final int port, final int timeoutInMs, final ErrorHandler errorHandler)
Observable<Boolean> observeInternetConnectivity(final InternetObservingStrategy strategy)
Observable<Boolean> observeInternetConnectivity(final InternetObservingStrategy strategy, final String host)
Single<Boolean> checkInternetConnectivity(InternetObservingStrategy strategy)
Single<Boolean> checkInternetConnectivity(String host,int port, int timeoutInMs)
Single<Boolean> checkInternetConnectivity(String host, int port, int timeoutInMs, ErrorHandler errorHandler)
Single<Boolean> checkInternetConnectivity(final InternetObservingStrategy strategy, final String host)- added
InternetObservingSettingsclass - added the following methods to the
ReactiveNetworkclass:
Observable<Boolean> observeInternetConnectivity(InternetObservingSettings settings)
Single<Boolean> checkInternetConnectivity(InternetObservingSettings settings)03 Jan 2018
- updated project dependencies -> see: https://github.com/pwittchen/ReactiveNetwork/commit/abc1fd5e7f18e3fa504e071f000ae5067946c68f
- updated gradle configuration in
config/quality.gradle(replaced deprecated invocations with new ones)
11 Nov 2017
- updated API of
MarshmallowNetworkObservingStrategy- made
void registerIdleReceiver(context)protected - made
boolean isIdleMode(context)protected - made
tryToUnregisterCallback(ConnectivityManager)protected - made
tryToUnregisterReceiver(context)protected - made
NetworkCallback createNetworkCallback(context)protected - added
BroadcastReceiver createIdleBroadcastReceiver() - added
onNext(Connectivity connectivity) - added
MarshmallowNetworkObservingStrategy()constructor - extracted
Stringmessages intoprotected static finalfields
- made
- set min sdk version for sample apps to 14
- updated Gradle v. 3.0.0.
- updated compile sdk version: 25 -> 26
- updated build tools version: 25.0.2 - > 26.0.2
- updated kotlin version: 1.1.3-2 -> 1.1.51
- updated project dependencies
- RxJava 2.1.2 -> 2.1.6
- support-annotations: 25.3.0 -> 27.0.1
- appcompat-v7: 25.3.0 -> 27.0.1
- truth: 0.34 -> 0.36
- mockito-core: 2.8.47 -> 2.12.0
- added ErrorProne for static code analysis
- added NullAway for static code analysis
02 Sep 2017
Fixed memory leak in PreLollipopNetworkObservingStrategy during disposing of an Observable - issue #219.
30 Aug 2017
- Fixed NPE occuring when
ConnectivityManagerisnullinReactiveNetwork.observeNetworkConnectivity()method - issue #209 - Added new methods to the API for checking Internet connectivity - issue #205
Observable<Boolean> observeInternetConnectivity(strategy, host)Single<Boolean> checkInternetConnectivity(strategy, host)
- Added to documentation comment about monitoring Internet connectivity with custom host - issue #204
- Classes which implement InternetObservingStrategy handle custom hosts with and without
http://orhttps://prefix gracefully - issue #206 - organized packages with unit tests
- made the library more hermetic
- changed visibility of
SocketInternetObservingStrategy#isConnected(String host, int port, int timeoutInMs, ErrorHandler handler)method frompublictoprotected - changed visibility of
SocketInternetObservingStrategy#isConnected(Socket socket, String host, int port, int timeoutInMs, ErrorHandler errorHandler)method frompublictoprotected - changed visibility of
Connectivity#create(Context, ConnectivityManager)method frompublictoprotected - changed visibility of
WalledGardenInternetObservingStrategy#isConnected(String host, int port, int timeoutInMs, ErrorHandler errorHandler)method frompublictoprotected - changed visibility of
WalledGardenInternetObservingStrategy#createHttpUrlConnection(String host, int port, int timeoutInMs)method frompublictoprotected
05 Aug 2017
- added
WalledGardenInternetObservingStrategy- fixes #116 - made
WalledGardenInternetObservingStrategya default strategy for checking Internet connectivity - added documentation for NetworkObservingStrategy - solves #197
- added documentation for InternetObservingStrategy - solves #198
- fixed package name in
AndroidManifest.xmlfile - solves #195 - bumped RxJava2 version to 2.1.2
- bumped Kotlin version to 1.1.3-2
- bumped Gradle Android Tools version to 2.3.3
- bumped Retrolambda to 3.7.0
- increased code coverage with unit tests
18 Jul 2017
- bumped RxJava2 version to 2.1.1
- bumped test dependencies
- created Code of Conduct
- updated unit tests
- updated Kotlin version in sample apps
- added retrolambda to the sample Java app - issue #163
- fixed behavior of network observing in disconnected state - issue #159
- added the following methods to
ReactiveNetworkclass:Single<Boolean> checkInternetConnectivity()Single<Boolean> checkInternetConnectivity(InternetObservingStrategy strategy)Single<Boolean> checkInternetConnectivity(String host, int port, int timeoutInMs)Single<Boolean> checkInternetConnectivity(String host, int port, int timeoutInMs, ErrorHandler errorHandler)Single<Boolean> checkInternetConnectivity(InternetObservingStrategy strategy, String host, int port, int timeoutInMs, ErrorHandler errorHandler)
30 Apr 2017
- updated
ConnectivityPredicateand replacedio.reactivex.functions.Functionwithio.reactivex.functions.Predicateto make it compatible with RxJava2 filtering methods #168 - bumped RxJava2.x version to 2.1.0
11 Apr 2017
- migrated library to RxJava2.x on RxJava2.x branch and released it as
reactivenetwork-rx2artifact - updated dependencies
- updated documentation
- updated sample apps
12 Feb 2017
- renamed
DefaultInternetObservingStrategytoSocketInternetObservingStrategyclass - added
observeInternetConnectivity(InternetObservingStrategy)method toReactiveNetworkclass - removed
DefaultInternetObservingStrategy#ON_CLOSE_SOCKET_ERROR_MSGstatic field - added permission annotations
- updated
Connectivityclass. Now it contains the following fields with getters:state, detailedState, type, subType, available, failover, roaming, typeName, subTypeName, reason, extraInfo(it's wrapped data ofNetworkInfoclass from Android SDK) - added
Builderto theConnectivityclass - created
ConnectivityPredicateclass - methods
Func1<Connectivity, Boolean> hasState(final NetworkInfo.State... states)andFunc1<Connectivity, Boolean> hasType(final int... types)were moved fromConnectivityclass toConnectivityPredicateclass - updated Gradle and Travis configuration
- updated project dependencies
11 Dec 2016
- added
isConnected(final String host, final int port, final int timeoutInMs, ErrorHandler errorHandler)method toDefaultInternetObservingStrategyclass - added
isConnected(final Socket socket, final String host, final int port, final int timeoutInMs, final ErrorHandler errorHandler)method toDefaultInternetObservingStrategyclass - renamed
SocketErrorHandlertoErrorHandlerand updated its API - renamed
DefaultSocketErrorHandlertoDefaultErrorHandler - updated API of the
InternetObservingStrategy - updated packages organization
- migrated unit tests to Robolectric (now tests can be executed without an emulator or a device)
- enabled test coverage reports with codecov.io and Jacoco
- test coverage was increased from 54% to 74%
- unit tests are now executed on Travis CI
- test coverage report is generated by Travis CI with codecov.io
- added
MarshmallowNetworkObservingStrategyand handling Doze mode - bumped RxJava to v. 1.2.3
- updated build tools to v. 2.0.3
- updated Gradle configuration
- updated Travis CI configurati
20 Oct 2016
- fixed bug with the crash during unregister receiver for Pre-Lollipop devices #87
- extended
NetworkObservingStrategywithvoid onError(String message, Exception exception)method, which allows handling errors in network observing strategies - closed the socket in the Internet connection check #91
- added
SocketErrorHandlerwith a default implementation inDefaultSocketErrorHandlerclass, which allows handling errors during closing socket connection - delegated observing Internet connectivity functionality to separate class hidden behind
InternetObservingStrategyinterface - added an
InternetObservingStrategyinterface with the default implementation inDefaultInternetObservingStrategyclass, which allows to customize Internet observing strategy - added
Observable<Boolean> observeInternetConnectivity(int initialIntervalInMs, int intervalInMs, String host, int port, int timeout)method toReactiveNetworkclass - added
Observable<Boolean> observeInternetConnectivity(final int initialIntervalInMs, final int intervalInMs, final String host, final int port, final int timeoutInMs, final SocketErrorHandler socketErrorHandler)method toReactiveNetworkclass - added
Observable<Boolean> observeInternetConnectivity(final InternetObservingStrategy strategy, final int initialIntervalInMs, final int intervalInMs, final String host, final int port, final int timeoutInMs, final SocketErrorHandler socketErrorHandler)method toReactiveNetworkclass - bumped RxJava version to 1.2.1
03 Sep 2016
- bumped RxJava to 1.1.9
- bumped Gradle Build Tools to 2.1.3
30 Jul 2016
- bumped RxJava to v. 1.1.8
24 Jul 2016
- handled all connection types (including Ethernet) (issue #71)
- removed
ConnectivityStatusenum and replaced it withConnectivityclass. - replaced
Observable<ConnectivityStatus> observeNetworkConnectivity(final Context context)method withObservable<Connectivity> observeNetworkConnectivity(final Context context) - introduced a new way of network monitoring with NetworkCallback available from Android N (API 21) (issue #62)
- added
NetworkObservingStrategy, which allows applying different network monitoring strategies - added
PreLollipopNetworkObservingStrategywith old network monitoring implementation - added
LollipopNetworkObservingStrategywith new network monitoring implementation - added
Observable<Connectivity> observeNetworkConnectivity(final Context context, final NetworkObservingStrategy strategy)method to ReactiveNetwork class - made method for creating Observables static like in original RxJava library
- added
create()method toReactiveNetworkclass - made constructor of
ReactiveNetworkclass protected - added
Preconditionsclass verifying correctness of the input parameters - added more unit tests
11 Jun 2016
Removed deprecated methods from the public API:
- removed depreacted
Observable<ConnectivityStatus> observeConnectivity(final Context context)method in favor ofObservable<ConnectivityStatus> observeNetworkConnectivity(final Context context)method - removed depreacted
Observable<List<ScanResult>> observeWifiAccessPoints(final Context context)method in favor of ReactiveWiFi library - removed depreacted
Observable<WifiSignalLevel> observeWifiSignalLevel(final Context context)method in favor of ReactiveWiFi library - removed depreacted
Observable<Integer> observeWifiSignalLevel(final Context context,final int numLevels)method in favor of ReactiveWiFi library
Removed permissions in AndroidManifest.xml:
- removed
android.permission.ACCESS_WIFI_STATEpermission fromAndroidManifest.xml - removed
android.permission.CHANGE_WIFI_STATEpermission fromAndroidManifest.xml - removed
android.permission.ACCESS_COARSE_LOCATIONpermission fromAndroidManifest.xml
07 Jun 2016
- removed
enableInternetCheck()method - removed
ConnectivityStatus.WIFI_CONNECTED_HAS_INTERNETenum value - removed
ConnectivityStatus.WIFI_CONNECTED_HAS_NO_INTERNETenum value - changed method name from
Observable<ConnectivityStatus> observeConnectivity(final Context context)toObservable<ConnectivityStatus> observeNetworkConnectivity(final Context context) - deprecated
Observable<ConnectivityStatus> observeConnectivity(final Context context)method - deprecated
Observable<List<ScanResult>> observeWifiAccessPoints(final Context context)method - depreceated
Observable<WifiSignalLevel> observeWifiSignalLevel(final Context context)method - deprecated
Observable<Integer> observeWifiSignalLevel(final Context context, final int numLevels)method - changed method signature from
ConnectivityStatus getConnectivityStatus(final Context context, final boolean checkInternet)toConnectivityStatus getConnectivityStatus(final Context context) - updated
ConnectivityStatus getConnectivityStatus(final Context context)method and added JavaDoc for it - added
Observable<Boolean> observeInternetConnectivity(final int interval, final String host, final int port, final int timeout)method - added
Observable<Boolean> observeInternetConnectivity()method - added
android.permission.INTERNETto theAndroidManifest.xml - updated JavaDoc
- updated sample apps
- updated documentation in
README.md - bumped RxJava version to 1.1.5
- bumped RxAndroid version to 1.2.0
- bumped Google Truth version to 0.28 (test dependency)
10 Feb 2016
- added possibility to observe WiFi signal level with
observeWifiSignalLevel(context, numLevels)andobserveWifiSignalLevel(context)method - created
WifiSignalLevelenum - added internet check to parameters of
getConnectivityStatus(context, checkInternet)method - made
getConnectivityStatus(context, checkInternet)method public - changed String variable
statusinConnectivityStatusenum todescriptionand made it public - changed output of the
toString()method inConnectivityStatusto keep consistency with another enum - made
ReactiveNetworkclass non-final - bumped Kotlin version in sample app to 1.0.0-rc-1036
- increased immutability of code of the library
- updated sample apps and documentation
10 Jan 2016
- Due to memory leak in WifiManager reported in issue 43945 in Android issue tracker replaced Activity Context with Application Context in sample apps and added appropriate note in
README.md - added
ACCESS_COARSE_LOCATIONpermission toAndroidManifest.xmlto be able to scan WiFi access points on Android 6
13 Dec 2015
- bumped RxJava dependency to v. 1.1.0
- bumped RxAndroid dependency to v. 1.1.0
- bumped Google Truth test dependency to v. 0.27
06 Nov 2015
- fixed bug with incorrect status after going back from background inside the sample app reported in issue #31
- fixed RxJava usage in sample app
- fixed RxJava usage in code snippets in
README.md - added static code analysis
- updated code formatting
- added sample sample app in Kotlin
01 Oct 2015
- now library is emitting
OFFLINEstatus at subscription time, when device is not connected to any network - bumped target SDK version to 23
- bumped buildToolsVersion to 23.0.1
- removed
CHANGE_NETWORK_STATEandINTERNETpermissions fromAndroidManifest.xml, because they're no longer required
27 Sep 2015
- bumped RxJava to v. 1.0.14
- bumped Gradle Build Tools to v. 1.3.1
13 Sep 2015
- changed
UNDEFINEDstatus toUNKNOWN - added
WIFI_CONNECTED_HAS_INTERNETandWIFI_CONNECTED_HAS_NO_INTERNETstatuses - added
enableInternetCheck()method toReactiveNetworkobject. When it's called,WIFI_CONNECTED_HAS_INTERNETandWIFI_CONNECTED_HAS_NO_INTERNETstatuses can occur. Otherwise, onlyWIFI_CONNECTEDcan occur.
02 Sep 2015
- added
WifiManager.SCAN_RESULTS_AVAILABLE_ACTIONto BroadcastReceiver responsible for receiving WiFi access points scan results - fixed bug connected with improper work of
observeWifiAccessPoints()method reported in issue #8 - updated sample app
01 Sep 2015
- removed
WifiManager.WIFI_STATE_CHANGED_ACTIONfilter from BroadcastReceiver for observing connectivity (now we're observing only situation when device connects to the network or disconnects from the network - not situation when user turns WiFi on or off) - added
UNDEFINEDelement forConnectivityStatus - fixed bug causing emission of the same
ConnectivityStatustwice
20 Aug 2015
- improved WiFi Access Points scanning
- updated documentation
10 Aug 2015
First release of the library.