How do i get this: YOUR_APP_SERVER_KEY

pnet1pnet1 USMember ✭✭✭✭

I'm trying to work to send message in the example of the @HabibAli_Subhan. How can i get this: YOUR_APP_SERVER_KEY
this is the code made by HabibAli

public static async Task<IFCMResponse> foo()
        {
            FCMClient client = new FCMClient("YOUR_APP_SERVER_KEY"); //as derived from https://console.firebase.google.com/project/
            var message = new Message()
            {
                To = "DEVICE_ID_OR_ANY_PARTICULAR_TOPIC", //topic example /topics/all
                Notification = new AndroidNotification()
                {
                    Body = "great match!",
                    Title = "Portugal vs. Denmark",
                }
            };
            var result = await client.SendMessageAsync(message);
            return result;
        }

The code above must be into a service and not an App, all right?

Best Answer

Answers

  • pnet1pnet1 USMember ✭✭✭✭

    @Praveen.B, what is this, where i get it this:

    DEVICE_ID_OR_ANY_PARTICULAR_TOPIC

    I'm learning xamarin and mobile programming and i'm lost.

Sign In or Register to comment.