Orb

General

Category
Free
Tag
Networking
License
MIT License
Min SDK
16 (Android 4.1 Jelly Bean)
Registered
Sep 2, 2020
Favorites
0
Link
https://github.com/ezralazuardy/orb
See also
AirTube
Apache Commons Net
Iris
Merlin
Flender

Additional

Language
Kotlin
Version
0.0.2 (May 6, 2020)
Created
May 1, 2020
Updated
Aug 31, 2020
Owner
Ezra Lazuardy (ezralazuardy)
Contributors
Imgbot (ImgBotApp)
Ezra Lazuardy (ezralazuardy)
2
Activity
Badge
Generate
Download
Source code
APK file

Commercial


Orb is a lifecycle-aware asynchronous network monitoring library to simplify the needs of network state monitoring in Android. This library can help you monitor (observe) the current network state of Android device. It can give you the current connection status, and connection type in realtime change events without blocking the main thread. Orb really works well with the MVVM architecture pattern in Android.

How it works

Orb is an implementation of Android Live Data that use an observable pattern to get the network state data in realtime. This is what makes Orb lifecycle-aware. Since the lifecycle of Live Data object is already handled automatically by Android lifecycle, you don't need to handle the Orb lifecycle manually. It's guarantee you to be flexible and no memory leak. You can just start Orb and forget about it, it'll handle the lifecycle based on your Activity lifecycle automatically.

How Orb determine the current network state and type is by using ConnectivityManager. And due to some Android ConnectivityManager API deprecation, applying network managing algorithm can be a little bit hard and tricky. Here's come Orb to the rescue. Orb is simple, powerful, sweet, and the most important, idiomatic!. It's written in pure Kotlin.

Latest version

See the latest released Orb version here.



// module level gradle
dependencies {
    implementation 'com.github.ezralazuardy:orb:$version' //replace '$version' with the latest version of orb
}

Maven setup

<!-- <repositories> section of pom.xml -->
<repository>
    <id>jitpack.io</id>
   <url>https://jitpack.io</url>
</repository>
<!-- <dependencies> section of pom.xml -->
<dependency>
    <groupId>com.github.ezralazuardy</groupId>
    <artifactId>orb</artifactId>
    <version>version</version> <!-- replace 'version' with the latest version of orb -->
</dependency>