Exemplo n.º 1
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();
        }