Пример #1
0
 protected virtual void Awake()
 {
     if (NPSettings.Utility.RateMyApp.IsEnabled)
     {
         m_rateMyApp = gameObject.AddComponent <RateMyApp>();
     }
 }
Пример #2
0
        private void SetupRateNPSettings()
        {
            // Set rate my app
            RateMyAppSettings _settings = new RateMyAppSettings()
            {
                Title   = "Rate Cross Platform Native Plugins",
                Message = "If you enjoy using Native Plugin, Don't forget to rate us. Its like an extra beer for our whole team ;) " +
                          "It wont take more than a minute. Thanks for your support",
                ShowFirstPromptAfterHours     = 1,
                SuccessivePromptAfterHours    = 0,
                SuccessivePromptAfterLaunches = 20,
                DontAskButtonText             = null
            };

            m_rateMyApp          = new RateMyApp(_settings, new RateNPSettingsController());
            m_rateMyApp.Delegate = this;

            // Record load
            DateTime _lastOpenedDate;

            DateTime.TryParse(m_lastOpenedDateString, out _lastOpenedDate);

            if ((DateTime.Today - _lastOpenedDate).TotalHours > 24)
            {
                m_lastOpenedDateString = DateTime.Today.ToString();

                m_rateMyApp.RecordAppLaunch();
            }
            m_rateMyApp.AskForReview();
        }
Пример #3
0
		protected virtual void Awake ()
		{
			if (NPSettings.Utility.RateMyApp.IsEnabled)
			{
				m_rateMyApp	= gameObject.AddComponent<RateMyApp>();
			}
		}
Пример #4
0
        private void Awake()
        {
            // Set properties
            m_platform = CreatePlatformSpecificObject();

            RateMyAppSettings _settings = NPSettings.Utility.RateMyApp;

            if (_settings.IsEnabled)
            {
                RateMyApp = m_platform.CreateRateMyApp(_settings);
                RateMyApp.RecordAppLaunch();
            }
        }
Пример #5
0
        private void Awake()
        {
            // Set properties
            m_platform = CreatePlatformSpecificObject();

            if (NPSettings.Utility.RateMyApp.IsEnabled)
            {
                RateMyApp = new RateMyApp(
                    _settings: NPSettings.Utility.RateMyApp,
                    _controller: new RateStoreAppController()
                    );
                RateMyApp.RecordAppLaunch();
            }
        }
Пример #6
0
        public static RateMyApp Create(IRateMyAppViewController _viewController, IRateMyAppKeysCollection _keysCollection,
                                       IRateMyAppEventResponder _eventResponder, IRateMyAppOperationHandler _operationHandler,
                                       RateMyAppSettings _settings)
        {
            RateMyApp _newObject = new RateMyApp()
            {
                m_viewController   = _viewController,
                m_keysCollection   = _keysCollection,
                m_eventResponder   = _eventResponder,
                m_operationHandler = _operationHandler,
                m_settings         = _settings,
            };

            _newObject.MarkIfLaunchIsFirstTime();

            return(_newObject);
        }