Prompting for Feedback within your Windows Phone or Windows 8 app/game

Getting feedback for your apps and increasing your download number is a key way of increasing your ranking of your Windows 8 and Windows Phone application or game.

So here is a quick guide to how to increase the numbers of feedback rating you can receive, by simply asking people to review your app after they have used/started your app 10 times. The theory is nobody starts the app 10 times if they don’t like it and if the start it for the 10th time they probably like the app and give you a rating.

Windows Phone

MSDN https://msdn.microsoft.com/en-us/library/windowsphone/develop/ms598674(v=vs.105) for Windows Phone 8 you can’t use the MessageBox.Show in the Application_Launching event. So you should place your code in the OnNavigatedTo event of your first page..

Paste this little piece of code in the App.xaml.cs in the Application_Launching part of the file

    1: private void Application_Launching(object sender, LaunchingEventArgs e) 
    2: { 
    3:     IsolatedStorageSettings.ApplicationSettings["askforreview"] = false;
    4:  
    5:     int started = 0; 
    6:     if (IsolatedStorageSettings.ApplicationSettings.Contains("started")) 
    7:     { 
    8:         started = (int)IsolatedStorageSettings.ApplicationSettings["started"]; 
    9:     } 
   10:     started++; 
   11:     IsolatedStorageSettings.ApplicationSettings["started"] = started; 
   12:     if (started == 10) 
   13:     { 
   14:         IsolatedStorageSettings.ApplicationSettings["askforreview"] = true; 
   15:     } 
   16: }

Place the following code in your MainPage.xaml.cs (or any other page which might be the startpage of your app, for example when your app is pinned another page might be the startpage)

    1: protected override void OnNavigatedTo(NavigationEventArgs e) 
    2: { 
    3:     base.OnNavigatedTo(e);
    4:  
    5:     var askforReview = (bool)IsolatedStorageSettings.ApplicationSettings["askforreview"]; 
    6:     if (askforReview) 
    7:     { 
    8:         //make sure we only ask once! 
    9:         IsolatedStorageSettings.ApplicationSettings["askforreview"] =false; 
   10:         var returnvalue = MessageBox.Show("Thank you for using this app?", "Please review my app", MessageBoxButton.OKCancel); 
   11:         if (returnvalue == MessageBoxResult.OK) 
   12:         { 
   13:             var marketplaceReviewTask = new MarketplaceReviewTask(); 
   14:             marketplaceReviewTask.Show(); 
   15:         } 
   16:     } 
   17: }

Windows 8

Place this code in the OnLaunched event in the App.xaml.cs file. Just place it at the bottom below

    1: Windows.Current.Activate();

 

    1: int started = 0; 
    2: if (Windows.Storage.ApplicationData.Current.RoamingSettings.Values.ContainsKey("started")) 
    3: { 
    4:      started = (int)Windows.Storage.ApplicationData.Current.RoamingSettings.Values["started"]; 
    5: }
    6:  
    7: started++; 
    8: Windows.Storage.ApplicationData.Current.RoamingSettings.Values["started"] = started;
    9: //simply reduce the number here if you want the prompt changed? 
   10: if (started == 10) 
   11: { 
   12:      var md = new Windows.UI.Popups.MessageDialog("Thank you for using this app?", "Please review my app"); 
   13:      bool? reviewresult = null; 
   14:      md.Commands.Add(new Windows.UI.Popups.UICommand("OK", new Windows.UI.Popups.UICommandInvokedHandler((cmd) => reviewresult = true))); 
   15:      md.Commands.Add(new Windows.UI.Popups.UICommand("Cancel", new Windows.UI.Popups.UICommandInvokedHandler((cmd) => reviewresult = false))); 
   16:      await md.ShowAsync(); 
   17:      if (reviewresult == true) 
   18:      { 
   19:          string familyName = Package.Current.Id.FamilyName; 
   20:          await Windows.System.Launcher.LaunchUriAsync(new Uri(string.Format("ms-windows-store:REVIEW?PFN={0}", familyName))); 
   21:      } 
   22: } 

Ensure you make the call async, simply add aysnc in front of the OnLaunched event so it looks like this:

    1: async protected override void OnLaunched(LaunchActivatedEventArgs args)

Hope this helps you get more and better reviews of your app.