| | |
| | | Utlis.WriteLine("JPushOnRegister: " + p1); |
| | | } |
| | | |
| | | ///// <summary> |
| | | ///// 处理极光信息推送 |
| | | ///// </summary> |
| | | ///// <param name="title">标题</param> |
| | | ///// <param name="message">信息</param> |
| | | ///// <param name="extras">负载数据</param> |
| | | //public void AdjustJiguangMsgPush(JPushMessageInfo JPushMessageInfo) |
| | | //{ |
| | | // try |
| | | // { |
| | | // if (JPushMessageInfo.Extras.Contains("Offline") == true) |
| | | // { |
| | | // Shared.Application.RunOnMainThread(() => |
| | | // { |
| | | // //账号在别处登陆,被踢下线 跳转到登录页面 |
| | | // new Alert(Language.StringByID(StringId.Tip), Language.StringByID(StringId.LoggedOnOtherDevices), Language.StringByID(StringId.Close)).Show(); |
| | | // //2020-12-04 待增加退出登录操作 |
| | | // }); |
| | | // return; |
| | | // } |
| | | // else |
| | | // { |
| | | // Shared.Application.RunOnMainThread(() => |
| | | // { |
| | | // new Alert(JPushMessageInfo.Title, JPushMessageInfo.Content, Language.StringByID(StringId.Close)).Show(); |
| | | // }); |
| | | // return; |
| | | |
| | | // } |
| | | // } |
| | | // catch |
| | | // { |
| | | |
| | | // } |
| | | //} |
| | | |
| | | /// <summary> |
| | | /// 打开消息显示界面.010000 |
| | | /// </summary> |
| | |
| | | /// <param name="notificationMessage"></param> |
| | | public static void OpenNotification(Context context, NotificationMessage notificationMessage) |
| | | {
|
| | |
|
| | | try |
| | | { |
| | | var pushMes = new JPushMessageInfo() |
| | |
| | | Utlis.WriteLine("PushMes extras : " + pushMes.Extras); |
| | | Utlis.WriteLine("PushMes HomeId : " + pushMes.HomeId);
|
| | |
|
| | |
|
| | | Intent i = new Intent(context, typeof(BaseActivity));//Intent intent=new Intent( 起始组件对象 , 目标 Service.class);
|
| | | i.SetFlags(ActivityFlags.NewTask);
|
| | | context.StartActivity(i);
|
| | | //解析msg
|
| | | AdjustPushMessage(pushMes);
|
| | |
|
| | | //Shared.Application.RunOnMainThread(() =>
|
| | | //{
|
| | | // if (Shared.Application.Activity == null)
|
| | | // {
|
| | | // var tempIntent = new Intent(context, typeof(Shared.BaseActivity));//Intent intent=new Intent( 起始组件对象 , 目标 Service.class);
|
| | | // tempIntent.SetFlags(ActivityFlags.BroughtToFront);
|
| | | // context.StartActivity(tempIntent);
|
| | |
|
| | | // HDLCommon.Current.AdjustPushMessage(pushMes);
|
| | | // }
|
| | | // else
|
| | | // {
|
| | |
|
| | | // (Shared.Application.Activity as BaseActivity).MoveToFront();
|
| | | // HDLCommon.Current.AdjustPushMessage(pushMes);
|
| | | // }
|
| | | //});
|
| | | } |
| | | catch |
| | | { |
| | | |
| | | } |
| | | //catch (Exception ex) |
| | | //{ |
| | | // Utlis.WriteLine(ex.ToString()); |
| | | //} |
| | | } |
| | | |
| | | |
| | | |
| | | public static void AdjustPushMessage(JPushMessageInfo pushMes)
|
| | | {
|