Skip to content
This repository has been archived by the owner on Jan 19, 2024. It is now read-only.

Latest commit

 

History

History
62 lines (48 loc) · 1.54 KB

README.md

File metadata and controls

62 lines (48 loc) · 1.54 KB

Open Source Love GitHub GitHub forks GitHub issues GitHub pull requests GitHub contributors GitHub top language

notify

📮 a micro-library to simplifies a simple communication between activity, fragment, services, etc. through reactive-pattern.

installation

Step 1. Add the JitPack repository to your build file

   allprojects {
      repositories {
         ...
         maven { url 'https://jitpack.io' }
      }
   }

Step 2. Add the dependency

   dependencies {
      implementation 'com.github.isfaaghyth:notify:1.0'
   }

how to use it?

send notify

   Notify.send("Hai")

subscriber

  composite.add(Notify.listen(String::class.java, NotifyProvider(), Consumer {
      result -> Log.d("Notify", result)
  }))

or with throwable like this

  composite.add(Notify.listen(String::class.java, NotifyProvider(), Consumer {
      result -> Log.d("Notify", result)
  }, Consumer {
      err -> Log.e("Notify", err.message)
  }))

License

MIT

cheers!