Description
when i use "android firebase sdk", i can change topic from the UI button..
void buttonLangKor()
{
FirebaseMessaging.getInstance().unsubscribeFromTopic("LangKor");
FirebaseMessaging.getInstance().unsubscribeFromTopic("LangEng");
FirebaseMessaging.getInstance().subscribeToTopic("LangKor");
}
void buttonLangEng()
{
FirebaseMessaging.getInstance().unsubscribeFromTopic("LangKor");
FirebaseMessaging.getInstance().unsubscribeFromTopic("LangEng");
FirebaseMessaging.getInstance().subscribeToTopic("LangEng");
}
But, when i use "unity firebase sdk", i can't change topic from the UI button..
Instead, i can change topic when the app start time..
void Start()
{
....
InitializeFirebase()
...
}
void InitializeFirebase()
{
Firebase.Messaging.FirebaseMessaging.Unsubscribe("LangKor");
Firebase.Messaging.FirebaseMessaging.Unsubscribe("LangEng");
Firebase.Messaging.FirebaseMessaging.Subscribe("LangKor");
....
}
I want to change the topic every time i press the button in the app.
i would appreciate your advice. please help me~~