I\'m writing a WP7 application and I have code to ask the user for a marketplace review every five runs with an exponential back off so it is less annoying. If the user cli
No, MarketplaceReviewTask
does not have any events which return a value. A case with most of the Launcher
tasks. Chooser
tasks have events to collect the information. Like @willmel said in the comment, it does look like an invasion of privacy.
You can create a check which will check locally if user has rated the application earlier or not. Take a look at following code:
public void reviewfunction()
{
//For Windows phone 8 app
var settings = IsolatedStorageSettings.ApplicationSettings;
//For windows phone 8.1 app or universal app use the following line of code
//var settings = Windows.Storage.ApplicationData.Current.LocalSettings;
//set the app name
string Appname = "My app";
if (!settings.Contains("review"))
{
settings.Add("review", 1);
settings.Add("rcheck", 0);
}
else
{
int no = Convert.ToInt32(settings["review"]);
int check = Convert.ToInt32(settings["rcheck"]);
no++;
if ((no == 4 || no == 7 || no % 10 == 0) && check == 0)
{
settings["review"] = no;
MessageBoxResult mm = MessageBox.Show("Thank you for using this application.\nWould you like to give some time to rate and review this application to help us improve", Appname, MessageBoxButton.OKCancel);
if (mm == MessageBoxResult.OK)
{
settings["rcheck"] = 1;
MarketplaceReviewTask rr = new MarketplaceReviewTask();
rr.Show();
}
}
else
{
settings["review"] = no;
}
}
}
Hope this helps you. Source code can be downloaded from here.