TobiasBuchholz / Plugin.Firebase

Wrapper around the native Android and iOS Firebase Xamarin SDKs
MIT License
220 stars 49 forks source link

CrossFirebaseCloudMessaging.Current.GetTokenAsync() can't catch exception #164

Closed podg999 closed 1 year ago

podg999 commented 1 year ago

So I first call await CrossFirebaseCloudMessaging.Current.CheckIfValidAsync(); and then var token = await CrossFirebaseCloudMessaging.Current.GetTokenAsync();

but nothing happens, doesn't throw exception just stops debugging after few minutes.

Tested on 2 different androids with 2 different API-s (31, 33) and nothing works.

TobiasBuchholz commented 1 year ago

Could you provide a sample project? Otherwise it's hard to identify the problem based on two lines of code.

podg999 commented 1 year ago

Could you provide a sample project? Otherwise it's hard to identify the problem based on two lines of code.

yes, https://github.com/podg999/TestAppMauiPushNotifications

i then used https://github.com/andreas-nesheim/MauiFirebasePush with 1.2.0 Firebase version and got it to work for my needs