https://kotlinlang.org logo
#navigation-architecture-component
Title
# navigation-architecture-component
a

Aness Iqbal

12/13/2020, 4:29 PM
Hi there, I need to go to particular destination/dialog in my app when ever the user receives HTTP error 401. Is it possible to observe/post that error from simple kotlin class to a Host activity, doesn't matter whichever fragment I am on? I do not want to abuse live data for this as this condition may only occur sometimes. Any kind help will be appreciated.
f

Fatih

12/13/2020, 5:09 PM
I wrote a HTTP interceptor and a event-publisher/event-bus class for that which emits unauthorisation events to collectors
👍 1
a

Aness Iqbal

12/13/2020, 5:28 PM
I am already using HTTP interceptor in my retrofit service generator. Can I also get any help with code or more detail like how can I configure this emit such on each call?
5 Views