Пример #1
0
        public override void Update()
        {
            base.Update();

            // deferred callbacks
            _deferred.Dispatch();
        }
Пример #2
0
        public void Update()
        {
            _deffered.Dispatch();

#if UNITY_IPHONE
            if (!_gotToken)
            {
                var token = UnityEngine.iOS.NotificationServices.deviceToken;
                if (token != null)
                {
                    _gotToken = true;
                    var tokenHex = Encoding.ToHexString(token);
                    EB.Debug.Log("Got push token " + tokenHex);
                    _api.SetApplePushToken(tokenHex, OnSentApplePushToken);
                }
                else if (!string.IsNullOrEmpty(UnityEngine.iOS.NotificationServices.registrationError))
                {
                    _gotToken = true;
                    EB.Debug.LogWarning("failed to register for push token : " + UnityEngine.iOS.NotificationServices.registrationError);
                }
            }
#elif UNITY_ANDROID
            if (!_gotToken)
            {
                //	string androidID = OtherLevelsSDK.androidToken;
                //	if(!string.IsNullOrEmpty(androidID))
                //	{
                //		if (OtherLevelsPlugin.Instance != null)
                //		{
                //			OtherLevelsPlugin.Instance.deviceToken = androidID;
                //		}
                //		_gotToken = true;
                //	}
            }
#endif
        }
Пример #3
0
 public override void Update()
 {
     // dispatch calls on
     _deferred.Dispatch();
 }