diff --git a/README.md b/README.md
index 20aa468..0876599 100644
--- a/README.md
+++ b/README.md
@@ -1,14 +1,37 @@
-[](https://jitpack.io/#rommansabbir/NetworkX)
-

----
+[](#getting-started-quick)
+
+
+
+
+
+
+
+
+
+
+
+
-## Documentation
+ ⚡ Latest Version: 4.1.0 | Change Logs 🔰
-### Installation
+- NetworkX now works with both __Activity__ or __Application__ Scope (NetworkX lifecycle is bounded to `NetworkXLifecycle.Activity` or `NetworkXLifecycle.Application`)
+- Introduced `SmartConfig` to replace old config [`NetworkXConfig` has been deprecated]
+- New __API__ to initialize `NetworkX`, enabled smart refactoring to replace old __API__ with new one
+- New __API__ [`NoInternetDialogV2.forceClose()`] added to close `Dialog` forcefully
+- Added support for custom _Drawable_ to be shown in `NoInternetDialogV2`
+- Several __Classes__, __APIs__ has been deprecated.
+- Removed unused classes/packages
+- Colorful Documentation 😂
-Step 1. Add the JitPack repository to your build file .
+[](#getting-started-quick)
+
+Installation
+
+## ➤ Step 1:
+
+Add the JitPack repository to your build file .
```gradle
allprojects {
@@ -18,96 +41,105 @@ Step 1. Add the JitPack repository to your build file .
}
```
-Step 2. Add the dependency.
+## ➤ Step 2:
+
+Add the dependency.
```gradle
dependencies {
- implementation 'com.github.rommansabbir:NetworkX:Tag'
+ implementation 'com.github.rommansabbir:NetworkX:4.1.0'
}
```
----
-
-### Version available
-
-| Releases
-| ------------- |
-| 4.0.0 |
-
-
-# Usages
-
-## Step 1:
+## ➤ Step 3:
Initialize `NetworkX` from your `Application.onCreate()`
````
+ //Deprecated way
val builder = NetworkXConfig.Builder()
.withApplication(this)
// You can disable speed meter if not required
.withEnableSpeedMeter(true)
.build()
NetworkXProvider.enable(builder)
+
+ //New smart way
+ NetworkXProvider.enable(SmartConfig(this, true, NetworkXLifecycle.Application))
````
-## Step 2:
+## ➤ Step 4:
- To check Internet Connection status, simply call extension variable
`isInternetConnected` or `isInternetConnectedLiveData` or `isInternetConnectedFlow`.
````
-isInternetConnectedFlow.collectLatest {
- lifecycleScope.launch {
- textView.text = "Internet connection status: $it"
+ isInternetConnectedFlow.collectLatest {
+ lifecycleScope.launch {
+ textView.text = "Internet connection status: $it"
+ }
}
- }
````
- To get connected network speed/last known speed [`LastKnownSpeed`] call extension variable
`lastKnownSpeed` or `lastKnownSpeedLiveData` or `lastKnownSpeedFlow`
````
-lastKnownSpeed?.let {
- textView2.text ="S-${it.speed}|T-${it.networkTypeNetwork}|SS-${it.simplifiedSpeed}"
-}
+ lastKnownSpeed?.let {
+ textView2.text ="S-${it.speed}|T-${it.networkTypeNetwork}|SS-${it.simplifiedSpeed}"
+ }
````
- ## Notes:
- - **NetworkX** (including **Speed Meter**) only works when the **Activity** is in state between **OnCreate()** to **onDestroy()**.
- - To emit (**`MutableStateFlow`**) **Last Known Speed** or **Internet Connection Status**,required **`CoroutineScope`** works under a **`Dispatchers.IO`** context.
- - The default value for **Internet Connection Status** is `false`.
- - The default value for **LastKnownSpeed** is `NONE`.
+[](#getting-started-quick)
+
----
+NoInternetDialogV2
-### How to show the **`NoInternetDialogV2`**?
+- Show Dialog
+```kotlin
+ NoInternetDialogV2(
+ activity = WeakReference(this@MainActivity),
+ title = "No Internet Bro",
+ message = "This is just a dummy message",
+ buttonTitle = "Okay",
+ isCancelable = true
+ ) { /* Button Presses */ }
+```
+- Close Dialog (Forcefully)
+
+```kotlin
+ NoInternetDialogV2.forceClose()
+```
+- Determine if the `NoInternetDialogV2` is currently visible or not.
```kotlin
-NoInternetDialogV2(
- activity = WeakReference(this@MainActivity),
- title = "No Internet Bro",
- message = "This is just a dummy message",
- buttonTitle = "Okay",
- isCancelable = true
-) { /* Button Presses */ }
+ NoInternetDialogV2.isVisible
```
-* Also, you can determine if the `NoInternetDialogV2` is currently visible or not by calling this variable `NoInternetDialogV2.isVisible` which return an `Boolean`.
+[](#getting-started-quick)
+
+
+Notes:
+
+ - **NetworkX** (including **Speed Meter**) can work on both **Application** scope or **Activity** scope. If scope is **Activity**, NetworkX will *start/release* it's components based on _ActivityLifecycleCallback_ (**onCreate - onDestroy**). Else, it will *start* it's components only once and there will be no components *release* event.
+ - To emit (**`MutableStateFlow`**) **Last Known Speed** or **Internet Connection Status**,required **`CoroutineScope`** works under a **`Dispatchers.IO`** context.
+ - The default value for **Internet Connection Status** is `false`.
+ - The default value for **LastKnownSpeed** is `NONE`.
+
----
+[](#getting-started-quick)
-### Happy Coding....
+## Contact me
----
+✔ [LinkedIn](https://www.linkedin.com/in/rommansabbir/)
-### Contact me
+✔ [Website](https://rommansabbir.com)
-[LinkedIn](https://www.linkedin.com/in/rommansabbir/)
----
+[](#getting-started-quick)
### License
[Apache Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html)
````html
-Copyright (C) 2021 Romman Sabbir
+Copyright (C) 2022 Romman Sabbir
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.