Ejemplo n.º 1
0
        private async void AskForReview()
        {
#if !BETA
            if (!(NavigationContext.QueryString.ContainsKey("Action") && NavigationContext.QueryString["Action"].Equals("Record")) &&
                !(NavigationContext.QueryString.ContainsKey("VoiceCommand") && NavigationContext.QueryString["VoiceCommand"].Equals("Record")))
            {
                if (App.SettingsHelper.LaunchCount < 1 || App.SettingsHelper.LastLaunchDate < DateTime.Now.Date)
                {
                    if (!App.SettingsHelper.IsAppRated)
                    {
                        App.SettingsHelper.LaunchCount++;
                        App.SettingsHelper.LastLaunchDate = DateTime.Now;
                    }

                    if (App.SettingsHelper.LaunchCount == _askForRatingCount)
                    {
                        string result = null;

                        result = await ShowMessageAsync(AppResources.RatingMessageText, AppResources.RatingMessageCaption, new string[] { AppResources.RatingMessageRateButtonText, AppResources.RatingMessageCancelButtonText });

                        if (result != null && result.Equals(AppResources.RatingMessageRateButtonText))
                        {
                            App.SettingsHelper.IsAppRated = true;
                            TaskHelper.RateApp();
                        }
                        else
                        {
                            result = await ShowMessageAsync(AppResources.FeedbackMessageText, AppResources.FeedbackMessageCaption, new string[] { AppResources.FeedbackMessageGiveButtonText, AppResources.FeedbackMessageCancelButtonText });

                            if (result != null && result.Equals(AppResources.FeedbackMessageGiveButtonText))
                            {
                                TaskHelper.ContactSupport();
                            }
                        }

                        App.SettingsHelper.LaunchCount = 0;
                    }

                    App.SettingsHelper.SaveSettings();
                }
            }
#endif
        }
Ejemplo n.º 2
0
 public void Support(object arg)
 {
     TaskHelper.ContactSupport();
 }