Beispiel #1
0
        /// <summary>
        /// Gets the location manager service.
        /// </summary>
        /// <returns>The location manager service.</returns>
        public IPsdkLocationManagerService GetLocationManagerService()
        {
            if (!isPsdkValid())
            {
                return(null);
            }

            if (null != _locationsMgrService)
            {
                return(_locationsMgrService);
            }

            _locationsMgrService = GettingServiceByReflection <IPsdkLocationManagerService>("PsdkLocationManagerService");

            if (null != _locationsMgrService)
            {
                return(_locationsMgrService);
            }

            if (!_silent)
            {
                Debug.Log("Please import Monetization.unitypackage !");
            }
            return(null);
        }
Beispiel #2
0
        /// <summary>
        /// Setups the location manager service.
        /// </summary>
        /// <returns><c>true</c>, if location manager service was setuped, <c>false</c> otherwise.</returns>
        /// <param name="defaultDomain">Default domain.</param>
        /// <param name="serverDomain">Server domain.</param>
        public bool     SetupLocationManagerService()
        {
            registerInternalService(_locationsMgrService = GetLocationManagerService());
            if (null != _locationsMgrService)
            {
                PsdkEventSystem.Instance.SetAnalyticsDelegate(_analyticsService);
                return(_locationsMgrService.Setup());
            }

            return(false);
        }
Beispiel #3
0
        public PsdkLocationManagerService(IPsdkServiceManager sm)
        {
            switch (Application.platform)
            {
            case RuntimePlatform.IPhonePlayer:      _impl = new IphonePsdkLocationManagerService(sm.GetImplementation()); break;

                        #if UNITY_ANDROID
            case RuntimePlatform.Android:           _impl = new AndroidPsdkLocationManagerService(sm.GetImplementation()); break;
                        #endif
            case RuntimePlatform.WindowsEditor:
            case RuntimePlatform.OSXEditor:         _impl = new UnityEditorPsdkLocationManagerService(sm.GetImplementation()); break;

            default: throw new System.Exception("Platform not supported for PsdkLocationManagerService.");
            }
        }