コード例 #1
0
    public static void SetOpenState(bool isOpen)
    {
        if (!isOpen)
        {
            APush.StopAndriodPush();
        }
        else
        {
            APush.ResumeAndriodPush();
        }
        int value = (!isOpen) ? 0 : 1;

        PlayerPrefs.SetInt(LocalNoti.isOpenKey, value);
    }
コード例 #2
0
ファイル: APush.cs プロジェクト: whztt07/mobahero_src
 private void Start()
 {
     APush.andriodOne = this;
     if (PlayerPrefs.HasKey(APush.andKey))
     {
         APush.regId = PlayerPrefs.GetString(APush.andKey);
     }
     try
     {
         JPushBinding.setDebug(true);
         JPushBinding.initJPush(base.gameObject.name, "InitOK");
         JPushEventManager.instance.addEventListener(CustomEventObj.EVENT_INIT_JPUSH, base.gameObject, "initJPush");
         JPushEventManager.instance.addEventListener(CustomEventObj.EVENT_STOP_JPUSH, base.gameObject, "stopJPush");
         JPushEventManager.instance.addEventListener(CustomEventObj.EVENT_RESUME_JPUSH, base.gameObject, "resumeJPush");
         JPushEventManager.instance.addEventListener(CustomEventObj.EVENT_SET_TAGS, base.gameObject, "setTags");
         JPushEventManager.instance.addEventListener(CustomEventObj.EVENT_SET_ALIAS, base.gameObject, "setAlias");
         JPushBinding.getRegistrationId(base.gameObject.name, "onGetRegId");
     }
     catch (Exception ex)
     {
         this.msg = ex.ToString();
     }
 }