evollu / react-native-fcm

react native module for firebase cloud messaging and local notification

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Duplicate subscribe?

opened this issue · comments

Before openning an issue

  1. Reproduce it with the example project in this repo.
  2. If you can't receive iOS notification, make sure you can receive notification using quickstart-ios project provided by Firebase team

When openning an issue, please include following information for better support

  1. What version of RN and react-native-fcm are you running? 0.57.1
  2. What device are you using? (e.g iOS9 emulator, Android 6 device)? android device, android emulator , ios device
  3. Is your app running in foreground, background or not running? all

I have a question about subscribe to topic.

In my client code,
componentDidMount() {
FCM.subscribeToTopic('topicName')
}
In my server code (push api),
send to ('/topics/topicName')

As you can see in my client code..
Whenever user open my app, user subscribe to 'topicName'.
It is overlap? Is it okay?
For example, I open my app three time and automatically I subscribe to topic three time.
when firebase send push notification, firebase send push notificaiton to me three time??
In firebase store(save user device token..?), my device token is saved three time??