My onEvent in a fragment as below, capturing the authentication of the activity, in my Kotlin function. However, I can't get that onEvent triggered.
@Subscribe
fun onEvent(event: AuthenticationEvent) {
if (event.isAuthenticated) {
startFragment(signInFragment, SignInFragment.TAG)
} else {
startFragment(signOutFragment, SignOutFragment.TAG)
}
}
In my build.gradle file, I have add this
compile 'org.greenrobot:eventbus:3.0.0'
Is there anything I need to do to get this trigger?