Esempio n. 1
0
        /// <summary>
        /// Ons the application pause.
        /// </summary>
        /// <returns>The application pause.</returns>
        /// <param name="pauseStatus">Pause status.</param>
        void OnApplicationPause(bool pauseStatus)
        {
            if (pauseStatus == true)
            {
            }
            else
            {
                string catchData = null;
#if UNITY_ANDROID && !UNITY_EDITOR
                catchData = GCMService.GetPushMessage();
#elif UNITY_IPHONE && !UNITY_EDITOR
                catchData = NativeRecieveManager.GetPushMessageIos();
#endif
                if (string.IsNullOrEmpty(catchData) == false)
                {
                    NotificationRecieveManager.NextSceneProccess(catchData);
                }
            }
        }
    /// <summary>
    /// Pushs the catch proccess.
    /// </summary>
    /// <returns>The catch proccess.</returns>
    private void NextSceneProccess()
    {
        string recieveData = null;

#if UNITY_ANDROID && !UNITY_EDITOR
        recieveData = GCMService.GetPushMessage();
#elif UNITY_IPHONE && !UNITY_EDITOR
        recieveData = NativeRecieveManager.GetPushMessageIos();
#endif

        if (string.IsNullOrEmpty(recieveData) == false)
        {
            NotificationRecieveManager.NextSceneProccess(recieveData);
        }
        else
        {
            SceneHandleManager.NextSceneRedirect(CommonConstants.MYPAGE_SCENE);
        }
    }
        /// <summary>
        /// Ons the application pause.
        /// </summary>
        /// <returns>The application pause.</returns>
        /// <param name="pauseStatus">Pause status.</param>
        void OnApplicationPause(bool pauseStatus)
        {
            if (pauseStatus == true)
            {
                Debug.Log(" バックグラウンドから落ちた時");
            }
            else
            {
                string catchData = null;
#if UNITY_ANDROID && !UNITY_EDITOR
                catchData = GCMService.GetPushMessage();
#elif UNITY_IPHONE && !UNITY_EDITOR
                catchData = NativeRecieveManager.GetPushMessageIos();
#endif
                //プッシュキャッチした時の処理用。
                if (string.IsNullOrEmpty(catchData) == false)
                {
                    NotificationRecieveManager.NextSceneProccess(catchData);
                    NotificationRecieveManager._isCatch = true;
                }
            }
        }
 /// <summary>
 /// View this instance.
 /// </summary>
 public void ViewTouch()
 {
     NotificationRecieveManager.NextSceneProccess(_viewName + " " + _id);
 }