Xamarin Plugin.FirebasePushNotification导致应用程序进入休息状态

时间:2017-11-03 09:44:43

标签: c# firebase xamarin

Xamarin Plugin.FirebasePushNotification导致我的应用程序进入中断模式,它正在工作但是在我通过控制台发送了一些通知后,我随时尝试运行应用程序它会进入中断模式并说一个未处理的异常发生了,它说您的应用程序已进入中断状态,但没有代码显示,因为所有线程都在执行外部代码。

这是在MainApplication.cs中导致它的代码:

public override void OnCreate()
{
    base.OnCreate();

    //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) =>
        {

        };
}

然后在主要活动中我有这行代码:

FirebasePushNotificationManager.ProcessIntent(Intent);

当我更换google-services.json时,它会工作一段时间,然后再次随机中断,我不知道问题可能是什么

0 个答案:

没有答案
相关问题