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

📮 a micro-library to simplifies a simple communication between activity, fragment, services

License

Notifications You must be signed in to change notification settings

isfaaghyth/notify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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!

About

📮 a micro-library to simplifies a simple communication between activity, fragment, services

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published