且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在Xamarin.Forms中处理Android推送通知操作

更新时间:2023-02-26 20:47:45

事实证明,修正很容易.

The fixed turned out to be rather easy.

使用ActivityFlags.SingleTop代替使用ActivityFlags.ClearTopActivityFlags.NewTask.

然后在MainActivity.cs中覆盖OnNewIntent方法.

Then in your MainActivity.cs override the OnNewIntent method.

protected override void OnNewIntent(Intent intent)
{
    base.OnNewIntent(intent);

    ProcessPushNotification(intent);
}