Android 如何在使用Xamarin单击推送通知时打开第二个活动?
我正在使用Xamarin实现推送通知。推送通知工作正常,我可以接收推送通知。当我单击通知消息时,相应的页面没有打开,而加载的pop显示了很长一段时间。在android项目中单击通知时,我使用以下代码打开活动。我想从新的activity类调用portable项目中的方法Android 如何在使用Xamarin单击推送通知时打开第二个活动?,android,android-pendingintent,Android,Android Pendingintent,我正在使用Xamarin实现推送通知。推送通知工作正常,我可以接收推送通知。当我单击通知消息时,相应的页面没有打开,而加载的pop显示了很长一段时间。在android项目中单击通知时,我使用以下代码打开活动。我想从新的activity类调用portable项目中的方法 Intent intent = new Intent(context, typeof(Push)); intent.AddFlags(ActivityFlags.ClearTop); PendingIntent activity
Intent intent = new Intent(context, typeof(Push));
intent.AddFlags(ActivityFlags.ClearTop);
PendingIntent activity = PendingIntent.GetActivity(context, 0, intent, 0);
我调用了portable项目中的视图,如下所示
public void test(parameters)
{
await Navigation.PushModalAsync(new DescriptionPage(tileGrid,
m_eBookShortName, m_eBookName, false, downloadImage, deleteImageIcon,
m_downloadProgressbar));
}
我的代码中有什么问题?单击推送通知时如何启动xaml视图