You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
454 B

1 year ago
  1. using Plugin.Firebase.CloudMessaging;
  2. namespace firebase;
  3. public partial class MainPage : ContentPage
  4. {
  5. int count = 0;
  6. public MainPage()
  7. {
  8. InitializeComponent();
  9. }
  10. private async void OnCounterClicked(object sender, EventArgs e)
  11. {
  12. await CrossFirebaseCloudMessaging.Current.CheckIfValidAsync();
  13. var token = await CrossFirebaseCloudMessaging.Current.GetTokenAsync();
  14. Console.WriteLine($"FCM token: {token}");
  15. }
  16. }