You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Updated for Xamarin to MAUI.
I used to get the firebase token via FirebaseInstanceId.Instance.Token
That doesn't exist anymore.
It now says to use FirebaseMessaging.Instance.GetToken()
When I try it use that, I get the error Default FirebaseApp is not initialized in this process. Make sure to call FirebaseApp.initializeApp(Context) first.
So I added the following first: FirebaseApp.InitializeApp(Android.App.Application.Context);
Still get the same error message. I can't find a simple example on how to get this token now like I used to.
The text was updated successfully, but these errors were encountered:
Ultimately, all these packages do is provide generated wrappers that allow you to call Google’s API. We do not have much expertise in how to use those API’s properly.
You will likely need to use the Google's API documentation and relevant forums to determine how to write code for your desired outcome.
So in the upgrade to MAUI, it looks like I missed the google-services.json file. After I added that to my MAUI project. I was able to get the token via
string FirebaseToken = FirebaseMessaging.Instance.GetToken().Result.ToString();
Updated for Xamarin to MAUI.
I used to get the firebase token via FirebaseInstanceId.Instance.Token
That doesn't exist anymore.
It now says to use FirebaseMessaging.Instance.GetToken()
When I try it use that, I get the error Default FirebaseApp is not initialized in this process. Make sure to call FirebaseApp.initializeApp(Context) first.
So I added the following first: FirebaseApp.InitializeApp(Android.App.Application.Context);
Still get the same error message. I can't find a simple example on how to get this token now like I used to.
The text was updated successfully, but these errors were encountered: