Hello,
I am planning to implement different group for my current app with firebase notifications. What i want to do is , I want to be able to send push messages to members with active subscriptions , and without subscriptions seperately.
Currently we are using :
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
but i think this event fires as soon as the applicaiton is active so it is before the check of subscription status. How can i change the method to subscribe to paidmembers topic if the subscription is active , if the subscription ended delete from paidmembers topic and subscribe to freemembers topic.
I cant use fm.subscribetopic or unsucbscribe from outside the fcmconnected event also .
I would be happy if you can give a clue about it .Thanks
edit: Also lets say the users subscription has ended but he did not launch the app on purpose to continue receive push messages like a subscribed member. İf he does not launch the app , i wont be able to check if the users subscription has ended so i wont be able to delete him from the paidmembers topic and he will continue to receive push messages for the paid members ( do not think these messages like advertising these are premium push messages to send news for example )
			
			I am planning to implement different group for my current app with firebase notifications. What i want to do is , I want to be able to send push messages to members with active subscriptions , and without subscriptions seperately.
Currently we are using :
			
				B4X:
			
		
		
		Private Sub fm_FCMConnected
   Log("FCMConnected")
   'here we can subscribe and unsubscribe from topics
   fm.SubscribeToTopic("ios_general") 'add ios_ prefix to all topics
End Sub
	but i think this event fires as soon as the applicaiton is active so it is before the check of subscription status. How can i change the method to subscribe to paidmembers topic if the subscription is active , if the subscription ended delete from paidmembers topic and subscribe to freemembers topic.
I cant use fm.subscribetopic or unsucbscribe from outside the fcmconnected event also .
I would be happy if you can give a clue about it .Thanks
edit: Also lets say the users subscription has ended but he did not launch the app on purpose to continue receive push messages like a subscribed member. İf he does not launch the app , i wont be able to check if the users subscription has ended so i wont be able to delete him from the paidmembers topic and he will continue to receive push messages for the paid members ( do not think these messages like advertising these are premium push messages to send news for example )
			
				Last edited: