I am using react-native-firebase to handle the device notification in my react native app. I am using subscribeToTopic() and unsubscribeFromTopic() api to get alerts on my device.
Problem is I want to give user options to set one-time or all-time notification. By default notifications are all time until user unsubscribe from it. I want to auto unsubscribe from topic if user set it as one time notification and app is in background. Is there any way to handle while my app is in background ?
Can any one help me how I can handle it in my react native code or any how?
Any help would be appreciated.
Thanks.