a) Set the condition on screen initialization to store the notification count in the Tiny DB, so that Tiny DB will not set the notification count value to 0 every time the screen will initialize.
b) If the screen 2 is initializing is for the first time, Tiny DB will create tag with tag name “first_time” and the value will “no”.
c) Now if the value will be “no”, app will get the notification list from Firebase. If the value will not be “no”, which means the app screen is initializing for the first time, then step (b) will be repeated again.
d) After getting the notification list from the Firebase DB, we will compare the length of the notification list with the count which was stored in the Tiny DB. If the count value in Tiny DB will not be equal to the length of notification list, the label will show that the notification has been received.
e) When user will click on the label, Tiny DB will store the new value for the tag “count” which will be the updated count of notification list and hence, user will not see the notification indicator again.
Actually I am talking about the notification indicator like Facebook. When receive notifications on Facebook, we see the red dot above the bell icon, that’s what I am trying to say.