| | |
| | | catch (Exception ex)
|
| | | {
|
| | | //调试:记录系统异常
|
| | | Shared.Phone.UserCenter.HdlLogLogic.Current.WriteOtherText(Shared.Phone.UserCenter.DirNameResourse.SystemLogFile, ex.Message + "\r\n" + ex.StackTrace, true, false);
|
| | | Shared.Phone.HdlLogLogic.Current.WriteOtherText(Shared.Phone.HdlFileNameResourse.LogDirectory, ex.Message + "\r\n" + ex.StackTrace, true, false);
|
| | | }
|
| | | base.OnCreate();
|
| | | // 通过WXAPIFactory工厂,获取IWXAPI的实例
|
| | |
| | | { |
| | | try |
| | | { |
| | | if (Shared.Common.CommonPage.BackKeyCanClick == false) |
| | | if (Shared.Common.Config.Instance.BackKeyCanClick == false) |
| | | { |
| | | //不允许按返回键 |
| | | return; |
| | |
| | | { |
| | | Shared.Application.FontSize = 12; |
| | | AppCenter.Start("4802834a-e7e9-4dd8-93f1-c2f88f0bd464", typeof(Analytics), typeof(Crashes));
|
| | | #if Release |
| | | //保存获取的极光服务器上的注册ID到本地文件 |
| | | var registrationId = JPushInterface.GetRegistrationID(activity); |
| | | #if DEBUG
|
| | | //测试ID,瞎写的
|
| | | Shared.Common.Config.Instance.RegistrationID = "93f1c2f88f0bd464";
|
| | | #endif
|
| | | #if Release
|
| | | //保存获取的极光服务器上的注册ID到本地文件
|
| | | var registrationId = JPushInterface.GetRegistrationID(activity); |
| | | System.Console.WriteLine("registrationId-极光id=" + registrationId); |
| | | if (!string.IsNullOrEmpty(registrationId)) |
| | | { |
| | | Shared.Common.Config.Instance.RegistrationID = registrationId; |
| | | Shared.Common.Config.Instance.Save(); |
| | | } |
| | | //调试:记录极光ID |
| | | Shared.Phone.UserCenter.HdlLogLogic.Current.WriteOtherText(Shared.Phone.UserCenter.DirNameResourse.JiguangFile, "receive1:" + registrationId, true, true); |
| | | if (!string.IsNullOrEmpty(registrationId))
|
| | | {
|
| | | Shared.Common.Config.Instance.RegistrationID = registrationId;
|
| | | Shared.Common.Config.Instance.Save();
|
| | | }
|
| | | //调试:记录极光ID
|
| | | Shared.Phone.UserCenter.HdlLogLogic.Current.WriteOtherText(Shared.Phone.UserCenter.DirNameResourse.JiguangFile, "receive1:" + registrationId, true, true); |
| | | #endif |
| | | };
|
| | | BaseActivity.RefreshUIAction += (activity) =>
|
| | |
| | | if (!string.IsNullOrEmpty(regId))
|
| | | {
|
| | | Shared.Common.Config.Instance.RegistrationID = regId;
|
| | | Shared.Common.Config.Instance.Save();
|
| | | }
|
| | | #if Release
|
| | | //调试:记录极光ID
|
| | |
| | | System.Console.WriteLine(TAG, "extras : " + extras);
|
| | |
|
| | | //处理极光消息推送的逻辑函数
|
| | | Shared.Phone.UserCenter.HdlJiguangMsgPushLogic.Current.AdjustJiguangMsgPush(title, message, extras); |
| | | Shared.Phone.HdlJiguangMsgPushLogic.Current.AdjustJiguangMsgPush(title, message, extras); |
| | | } |
| | | /// <summary> |
| | | /// 打开消息显示界面 |