- Home /
Window phone rate & review button
Hi folks, can you tell me how to make a "Rate & Review" button in Unity for Window Phone ? I've found this code:
MarketplaceReviewTask marketplaceReviewTask = new MarketplaceReviewTask();
marketplaceReviewTask.Show();
but it need to use Microsoft.Phone.Tasks. But in Mono Develop I cannot "using" them. How can I do it ?
Answer by MyReallyLongName · May 31, 2014 at 12:56 PM
I'm also having trouble with this. Here are the options that I know so far
(Easy) Create a button that will redirect the user to the store's page. On WP it will also redirect them to the store app and they can review your app (or share it) by swiping once to the right. Not as clean as the native call but it works. However, you will need to publish the app before implementing the feature (snippet at the end).
(Easy + 10$) Buy the Windows Phone SDK asset from the store (I'll probably do it since I mostly work with WP. LINK
(Not so easy) Create your own plugin. I'm a Unity newbie so for me at least that's a no-no
Code snippet for #1
// As easy as 1-2-3
void OnGUI(){
if(GUI.Button(new Rect(0f,0f, 150, 50), "Rate and Review")){
Application.OpenURL("InsertStoreURLAsStringHere");
}
}
Answer by code-sumit · Jul 15, 2015 at 10:47 AM
Make use of EventHandler to call 'Review Task' from Unity. You can do this by following below steps(visit Unity Expert for detailed explanation).
In Unity Game Engine-
Create Event -
using UnityEngine;
using System;
public static class events
{
//Create a new event
public static event EventHandler RateUs;
public static void FireRateUs()
{
Debug.Log ("Opening Rate Task......");
//If event is subscribed than fire it
if(RateUs!=null)
RateUs(null,null);
}
}
Fire Event -
using UnityEngine;
public class RateUs : MonoBehaviour
{
void OnMouseDown()
{
events.FireRateUs();
}
}
In Visual Studio IDE
Subscribe Event -
public MainPage()
{
.
.
.
.
events.RateUs += events_RateUs;
}
Call Function -
void events_RateUs(object sender, EventArgs e)
{
MarketplaceReviewTask marketplaceReviewTask = new MarketplaceReviewTask();
marketplaceReviewTask.Show();
}
Answer by Artyom-Abgaryan · Sep 21, 2015 at 09:24 AM
Here is a free alternative with IAP - https://www.assetstore.unity3d.com/en/#!/content/18924 ;)
Your answer
Follow this Question
Related Questions
IOS Review reminder 1 Answer
How to rate/review assets in the asset store? 0 Answers
How to use SKStoreReviewController? 0 Answers
Trying to implement Rate My App for Android and I get this error 0 Answers
targetframerate is being ignored 1 Answer