DerFaizio
DerFaizio

Reputation: 158

Topic subscription on app update

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.

Upvotes: 2

Views: 616

Answers (2)

Sanjay Dattatri
Sanjay Dattatri

Reputation: 129

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.

Upvotes: 1

AL.
AL.

Reputation: 37778

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.

Upvotes: 3

Related Questions