| | |
| | | /// <param name="notificationMessage"></param> |
| | | public override void OnNotifyMessageOpened(Context context, NotificationMessage notificationMessage) |
| | | { |
| | | |
| | | |
| | | //2020-12-23 解决点击通知栏打开不了APP问题 |
| | | //base.OnNotifyMessageOpened(context, notificationMessage); |
| | | OpenNotification(context, notificationMessage); |
| | | MainPage.Log("接收到推送:点击通知回调"); |
| | | OpenNotification(context, notificationMessage,true); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | /// <param name="context"></param> |
| | | /// <param name="notificationMessage"></param> |
| | | public static void OpenNotification(Context context, NotificationMessage notificationMessage) |
| | | public static void OpenNotification(Context context, NotificationMessage notificationMessage,bool isNotification = false) |
| | | {
|
| | | try |
| | | { |
| | | MainPage.Log("接收到推送:打开消息显示界面"); |
| | | var pushMes = new JPushMessageInfo() |
| | | { |
| | | Title = notificationMessage.NotificationTitle, |
| | | Content = notificationMessage.NotificationContent, |
| | | Extras = notificationMessage.NotificationExtras |
| | | Extras = notificationMessage.NotificationExtras, |
| | | isNotificationGoing = isNotification |
| | | }; |
| | | |
| | | var jpushExpandData = GetJPushExpandData(pushMes); |
| | |
| | | else |
| | | { |
| | | Intent i = new Intent(context, typeof(BaseActivity)); |
| | | i.SetFlags(ActivityFlags.SingleTop); |
| | | i.SetFlags(ActivityFlags.ClearTop); |
| | | i.SetFlags(ActivityFlags.NewTask); |
| | | context.StartActivity(i); |
| | | } |
| | | //解析msg
|
| | | AdjustPushMessage(pushMes);
|
| | |
|
| | | } |
| | | catch |
| | | { |