Exemplo n.º 1
0
 public override void Exit(OnFinish <Result> exitListener)
 {
     MSDKLogin.LoginRetEvent        -= OnLoginRetEvent;
     MSDKLogin.LoginBaseRetEvent    -= OnLoginBaseRetEvent;
     MSDKNotice.NoticeRetEvent      -= OnNoticeRetEvent;
     MSDKPush.PushBaseRetEvent      -= OnPushBaseRetEvent;
     MSDKPush.PushNotificationEvent -= OnPushNotificationEvent;
     MSDKCrash.CrashBaseRetEvent    -= OnCrashBaseRetEvent;
     MSDKPush.UnregisterPush("XG");
 }
Exemplo n.º 2
0
 public override void DeleteTag(string tag, string channel = "")
 {
     if (channel == "" || channel == null)
     {
         MSDKPush.DeleteTag("XG", tag);
     }
     else
     {
         MSDKPush.DeleteTag(channel, tag);
     }
 }
Exemplo n.º 3
0
 public override void RegisterPush(OnFinish <RemoteNotification> callback = null, string account = "", string channel = "")
 {
     this.pushCallback = callback;
     if (channel == "" || channel == null)
     {
         MSDKPush.RegisterPush("XG", account);
     }
     else
     {
         MSDKPush.RegisterPush(channel, account);
     }
 }
Exemplo n.º 4
0
        public override void PushNotification(string content, int delay, int id)
        {
            MSDKLocalNotification message = new MSDKLocalNotification();

            message.ActionType = 1;
            message.Type       = 1;
            message.Content    = content;
            message.Title      = Application.productName;
            // 马上通知,本地推送会有五分钟的弹性时间,如果小于当前时间就是马上通知
            message.Date = DateTime.Now.ToString("yyyyMMdd");
            message.Hour = DateTime.Now.Hour.ToString();
            message.Min  = (DateTime.Now.Minute + delay).ToString();
            MSDKPush.AddLocalNotification("XG", message);
        }
Exemplo n.º 5
0
 public override void InitGCloud(InitializeInfo cloudInfo)
 {
     MSDKLogin.LoginRetEvent        += OnLoginRetEvent;
     MSDKLogin.LoginBaseRetEvent    += OnLoginBaseRetEvent;
     MSDKNotice.NoticeRetEvent      += OnNoticeRetEvent;
     MSDKPush.PushBaseRetEvent      += OnPushBaseRetEvent;
     MSDKPush.PushNotificationEvent += OnPushNotificationEvent;
     MSDKCrash.CrashBaseRetEvent    += OnCrashBaseRetEvent;
     IGCloud.Instance.Initialize(cloudInfo);
     RegisterDirCallback();
     inited = true;
     MSDKPush.RegisterPush("XG");
     MSDKReport.Init("Beacon,TDM");
     MSDK.Init();
 }
Exemplo n.º 6
0
 public override void CleanAllNotification()
 {
     MSDKPush.ClearLocalNotifications("XG");
 }