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?
I think you have to get FCM api key to get notifications or sending messages.Go to https://console.firebase.google.com and create a project and get the required api key.
Hope this may help you.
Answers
I think you have to get FCM api key to get notifications or sending messages.Go to https://console.firebase.google.com and create a project and get the required api key.
Hope this may help you.
@Praveen.B, what is this, where i get it this:
I'm learning xamarin and mobile programming and i'm lost.