2

The user of my Android app is subscribed to a topic after performing a specific action and was receiving the topic notifications until he/she updated the app. After the update, the user cannot receive the topic notifications anymore.

  1. Is this the expected behavior?
  2. How can the user remain subscribed to the topic after updating/reinstalling an app?

Additional info: In this particular case, the topic subscription is not performed at the app startup but only after a particular user action. The app is developed with nativescript and the nativescript-plugin-firebase plugin.

DerFaizio
  • 148
  • 7
  • after update token get update so topic message not received by user – Divyesh Patel Jun 16 '17 at 10:56
  • @DivyeshPatel Hi. I was hoping if you could point me out to a documentation for that behavior? I think it would be nice to request for them to be updated. :) Or if ever, were you able to test this behavior out? Cheers! – AL. Jun 16 '17 at 15:13

2 Answers2

3

First off, it's important to know that a token is not refreshed in an app update.

Second, even if a token is refreshed, so long as the app isn't technically uninstalled, the topic subscriptions should be kept.

So to answer your questions:

  1. No. But it's hard to determine if this is actually an issue wih the FCM service or with the code (do post them should you edit your question).
  2. As I mentioned above, the subscriptions should be maintained. They only get lost when you explicitly unsubscribe them or if the app is uninstalled.
AL.
  • 36,815
  • 10
  • 142
  • 281
1

Store the fact that the user is subscribed to a topic in the database. In your app, at the appropriate place call subscribe to topic function, if the user is subscribed to it. Calling the function multiple times for the same topic has no adverse effects.

Sanjay Dattatri
  • 129
  • 1
  • 8