The broadcast message at the app launch will be used in the below following cases for ex -
Examples of use:
1. When Sunbird instance goes down, show a message about (the reason and) when it's going to come back up.
2. When Sunbird instance is going through a lot of issues, a message informing users about what the ongoing activity.
3. A general wishing the user about a festive day (e.g. Happy Diwali, Eid Mubarak, Merry Christmas etc.)
4. There can be other instances as well, where the need for usage of this feature can be used.
Approach -
a. Poll based approach was discarded because the app would poll everytime a end point and check for the status of the system. It was discarded because it does not provide the handy features as provided by FCM, which is discussed in the below point.
b. FCM - With FCM there are many advantages which helps to build our requirement in a handy way -
i - With FCM users can register to a topic and unregister to topic.
ii - For our requirement, we can have users by default registered to one topic which can be called as “General”
iii - And also their can be other topics which users can register based on their needs.
iv - With FCM we can send messages which can be a displayable or non-displayable, which will depend on the flag the payload contains.
v - Non-displayable payloads could be for the app side to enable/disable a feature for a particular group of users, could be used for A/B testing