Skip to content

Can i change topic from the UI button?? #7

Closed
@holymokee

Description

@holymokee

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~~

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions