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
namespace MyApp.Droid
{
[Application]
public class MainApplication : Application
{
public override void OnCreate()
{
base.OnCreate();
//Set the default notification channel for your app when running Android Oreo
if (Build.VERSION.SdkInt >= Android.OS.BuildVersionCodes.O)
{
//Change for your default notification channel id here
FirebasePushNotificationManager.DefaultNotificationChannelId = "FirebasePushNotificationChannel";
//Change for your default notification channel name here
FirebasePushNotificationManager.DefaultNotificationChannelName = "General";
FirebasePushNotificationManager.DefaultNotificationChannelImportance = NotificationImportance.High;
}
//If debug you should reset the token each time.
#if DEBUG
FirebasePushNotificationManager.Initialize(this, true);
#else
FirebasePushNotificationManager.Initialize(this, false);
#endif
//Handle notification when app is closed here
CrossFirebasePushNotification.Current.OnNotificationReceived += (s, p) =>
{
};
}
}
}
The text was updated successfully, but these errors were encountered:
Yahya0007
changed the title
CrossFirebasePushNotification.Current.OnTokenRefresh not always firing
CrossFirebasePushNotification.Current.OnTokenRefresh not always firing at app startup
Apr 23, 2023
💬 Questions and Help
Hi
The CrossFirebasePushNotification.Current.OnTokenRefresh is not firing around 1/3 of the time at app startup.
The code is as below.
Thanks
Regards
App.xaml.cs
MainActivity.cs
Application.cs in Android project root folder
The text was updated successfully, but these errors were encountered: