Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Introduction:

This wiki explains about broadcast message at the app launch

Problem Statement:

The broadcast message at the app launch will be used in the below following cases for ex -

...

4. There can be other instances as well, where the need for usage of this feature can be used.

Approach -

...

Solution:

  1. The poll based approach was discarded because the app would poll

...

  1. every time an endpoint 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.

...

  1. FCM - With FCM there are many advantages which helps to build our requirement in a handy way -

...

  • With FCM users can register

...

  • and unregister to a topic.

...

  • For our requirement, we can have users by default registered to one topic which can be called as “General”

...

  • And also

...

  • there can be other topics which users can register based on their needs.

...

  • With FCM we can send messages which can be

...

  • displayable or non-displayable, which will depend on the flag the payload contains.   

...

  • 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.
  • Using FCM we can set TTL for a message.
  • For the users in the offline state would receive the notification when they come online and won't receive if the TTL is expired.