I am recieving push notification from Firebase cloud messaging(FCM) and i want to treat the notification differently depending on which controller is active. but i cannot figure out the best way to achieve thtat. any help
Dont do that. Whatever you want to do, getting info about UI (like
ViewController) is the entirely wrong way to go.
Btw. You can't do that either with fragments or activties.
Osmandiyaka notifications@github.com schrieb am Do., 2. Nov. 2017, 12:42:
I am recieving push notification from Firebase cloud messaging(FCM) and i
want to treat the notification differently depending on which controller is
active. but i cannot figure out the best way to achieve thtat. any help—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/bluelinelabs/Conductor/issues/379, or mute the thread
https://github.com/notifications/unsubscribe-auth/AAjnrnksoMBprjRVvAngZn-b2v0-gjwrks5syaqegaJpZM4QPjfZ
.
This is how i am currently doing it. i attach a routerChangerListener to my router and track the current controller. i can then return it in a static method