Last active
July 30, 2018 21:54
-
-
Save insacc/5053c857e509b6f73364801d0e1a3a8b to your computer and use it in GitHub Desktop.
LiveBus subscription example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LiveBus.getInstance().subscribeLiveEvent("EVENT_TAG", EVENT_VALUE_CLASS_TYPE) | |
.observe(this, Observer { | |
it?.let { | |
// Process event | |
} | |
}) | |
LiveBus.getInstance().subscribeSingleLiveEvent("EVENT_TAG", EVENT_VALUE_CLASS_TYPE) | |
.observe(this, Observer { | |
it?.let { | |
// Process event | |
} | |
}) | |
LiveBus.getInstance().subscribeStickyLiveEvent("EVENT_TAG", EVENT_VALUE_CLASS_TYPE) | |
.observe(this, Observer { | |
it?.let { | |
// Process event | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment