Exemplo n.º 1
0
        public PsdkAnalyticsService(IPsdkServiceManager sm)
        {
            switch (Application.platform)
            {
            case RuntimePlatform.IPhonePlayer:      _impl = new IphonePsdkAnalytics(sm.GetImplementation()); break;

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

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

            //			#if UNITY_EDITOR
            //            _impl = new UnityEditorPsdkSplash(sm.GetImplementation());
            //			#elif UNITY_ANDROID
            //			_impl = new AndroidPsdkSplash(sm.GetImplementation());
            //			#elif UNITY_IPHONE
            //			_impl = new IphonePsdkSplash(sm.GetImplementation());
            //			#else
            //            throw new Exception("Platform not supported for Splash.");
            //			#endif
        }
Exemplo n.º 2
0
        public PsdkAppLifeCycleManager(IPsdkServiceManager sm)
        {
            _sm = sm;

            switch (Application.platform)
            {
            case RuntimePlatform.IPhonePlayer:      _impl = new IphonePsdkAppLifeCycleManager(sm.GetImplementation()); break;

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

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

//			#if UNITY_IPHONE && !UNITY_EDITOR
//			_impl = new IphonePsdkAppLifeCycleManager(sm.GetImplementation());
//			#elif UNITY_ANDROID  && !UNITY_EDITOR
//			_impl = new AndroidPsdkAppLifeCycleManager(sm.GetImplementation());
//			#elif UNITY_EDITOR
//			_impl = new UnityEditorPsdkAppLifeCycleManager(sm.GetImplementation());
//			#endif
        }
Exemplo n.º 3
0
        public PsdkRateUsService(IPsdkServiceManager sm)
        {
            _coolDown = (int)PSDKMgr.Instance.LocalConfig.GetLong(new String[] { "rateUs", "coolDown" }, 0);
            _satisfactionPointsThreshold = (int)PSDKMgr.Instance.LocalConfig.GetLong(new String[] { "rateUs", "satisfactionPointsThreshold" }, 0);
            _neverShow          = PlayerPrefs.GetInt("neverShow", 0) == 1 ? true : false;
            _satisfactionPoints = PlayerPrefs.GetInt("satisfactionPoints", 0);
            string dateString = PlayerPrefs.GetString("lastDisplayed", "");

            if (dateString.Length > 0)
            {
                DateTime.TryParse(dateString, out _lastDisplayed);
            }
        }
Exemplo n.º 4
0
        protected PSDKMgr()
        {
            switch (Application.platform)
            {
            case RuntimePlatform.IPhonePlayer:      _impl = new IphonePsdkServiceMgr(this); break;

                        #if UNITY_ANDROID
            case RuntimePlatform.Android:           _impl = new AndroidPsdkServiceMgr(this); break;
                        #endif
            case RuntimePlatform.WindowsEditor:
            case RuntimePlatform.OSXEditor:         _impl = new UnityEditorPsdkServiceMgr(this); break;

            default: throw new System.Exception("Platform not supported for PSDKMgr.");
            }
        }
Exemplo n.º 5
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.");
            }
        }
Exemplo n.º 6
0
        public AndroidPsdkAnalytics(IPsdkServiceManager serviceMgr)
        {
            _psdkServiceMgr = serviceMgr as AndroidPsdkServiceMgr;

            AndroidJavaObject javaAnalyticsDelegate = new AndroidJavaObject("com.tabtale.publishingsdk.unity.UnityAnalyticsDelegate");

            if (javaAnalyticsDelegate == null)
            {
                Debug.LogError("com.tabtale.publishingsdk.unity.UnityAnalyticsDelegate NULL");
            }
            else
            {
                _psdkServiceMgr.JavaClass.CallStatic("setAnalyticsDelegate", javaAnalyticsDelegate);
            }
        }
Exemplo n.º 7
0
        public PsdkSocialService(IPsdkServiceManager sm)
        {
                        #if UNITY_IPHONE
            UnityEngine.SocialPlatforms.GameCenter.GameCenterPlatform.ShowDefaultAchievementCompletionBanner(true);
                        #endif
                        #if UNITY_ANDROID
            PlayGamesClientConfiguration.Builder configBuilder = new PlayGamesClientConfiguration.Builder();

            if (PSDKMgr.Instance.GetCrossDevicePersistency() != null)
            {
                configBuilder.AddOauthScope("https://www.googleapis.com/auth/drive.appdata");
                configBuilder.AddOauthScope("https://www.googleapis.com/auth/drive.file");
            }

            PlayGamesClientConfiguration config = configBuilder.Build();
            PlayGamesPlatform.InitializeInstance(config);
            PlayGamesPlatform.DebugLogEnabled = true;
            PlayGamesPlatform.Activate();
                        #endif
        }
Exemplo n.º 8
0
 public AndroidPsdkRewardedAds(IPsdkServiceManager sm)
 {
     _sm = sm as AndroidPsdkServiceMgr;
 }
Exemplo n.º 9
0
 public AndroidPsdkAppLifeCycleManager(IPsdkServiceManager sm)
 {
     _sm = sm as AndroidPsdkServiceMgr;
 }
Exemplo n.º 10
0
 public PsdkBillingService(IPsdkServiceManager sm)
 {
 }
Exemplo n.º 11
0
 public UnityEditorPsdkAnalytics(IPsdkServiceManager sm)
 {
 }
 public AndroidPsdkLocationManagerService(IPsdkServiceManager sm)
 {
     _sm = sm as AndroidPsdkServiceMgr;
 }
 public IphonePsdkServiceMgr(IPsdkServiceManager rootPsdkServiceMgr)
 {
     _rootPsdkServiceMgr = rootPsdkServiceMgr;
 }
 public UnityEditorPsdkServiceMgr(IPsdkServiceManager rootPsdkServiceMgr)
 {
     _rootPsdkServiceMgr = rootPsdkServiceMgr;
 }
Exemplo n.º 15
0
 public UnityEditorPsdkRewardedAds(IPsdkServiceManager sm)
 {
 }
 public UnityEditorPsdkLocationManagerService(IPsdkServiceManager sm)
 {
 }
 public AndroidPsdkCrashTool(IPsdkServiceManager serviceMgr)
 {
     _psdkServiceMgr = serviceMgr as AndroidPsdkServiceMgr;
 }
Exemplo n.º 18
0
 public AndroidPsdkExternalConfiguration(IPsdkServiceManager sm)
 {
     _sm = sm as AndroidPsdkServiceMgr;
 }
 public AndroidPsdkServiceMgr(IPsdkServiceManager rootPsdkServiceMgr)
 {
     _rootPsdkServiceMgr = rootPsdkServiceMgr;
 }
 public IphonePsdkAnalytics(IPsdkServiceManager sm)
 {
     psdkSetupAnalytics();
 }
 public AndroidPsdkAudience(IPsdkServiceManager sm)
 {
     _sm = sm as AndroidPsdkServiceMgr;
 }
Exemplo n.º 22
0
 public AndroidPsdkSingular(IPsdkServiceManager serviceMgr)
 {
     _psdkServiceMgr = serviceMgr as AndroidPsdkServiceMgr;
 }
Exemplo n.º 23
0
 public IphonePsdkRewardedAds(IPsdkServiceManager sm)
 {
 }
Exemplo n.º 24
0
 public AndroidInAppPurchase(IPsdkServiceManager sm)
 {
     _sm = sm as AndroidPsdkServiceMgr;
 }
 public IphonePsdkCrashTool(IPsdkServiceManager sm)
 {
 }
 public IphonePsdkLocationManagerService(IPsdkServiceManager sm)
 {
 }
        public void Init()
        {
            psdkMgr = PSDKMgr.Instance;

            AddListeners();
        }
Exemplo n.º 28
0
 public IphonePsdkAppLifeCycleManager(IPsdkServiceManager sm)
 {
 }
Exemplo n.º 29
0
 public UnityEditorPsdkAppLifeCycleManager(IPsdkServiceManager sm)
 {
     _sm = sm;
 }
Exemplo n.º 30
0
 public UnityEditorPsdkCrashTool(IPsdkServiceManager sm)
 {
 }