Reviews
Suggest to the player to leave a review for the game.
Request Review
FREE- JavaScript
- Unity
ss.app.requestReview();
SS_App.ReviewRequest();
The method returns the success of the operation and the rating, see response fields.
- JavaScript
- Unity
const result = await ss.app.requestReview();
const { success, rating, error } = result;
if (success) {
// example of working with rating
switch (rating) {
case 5:
showWindow('We are very glad you enjoyed the game!');
break;
case 4:
case 3:
// including when the rating cannot be determined
case 0:
showWindow('Thank you for your review!');
break;
case 2:
case 1:
showWindow('We will strive to do better!');
}
}
public void ReviewRequest()
{
SS_App.ReviewRequest(OnReviewResult, OnReviewClose);
Debug.Log("Send review request");
}
//On success review
private void OnReviewResult(int result)
{
Debug.Log("Review result: " + result);
}
//On review close
private void OnReviewClose(string error)
{
Debug.Log("Review result: " + error);
}
Supported platforms
Platforms without support
Check support
FREE- JavaScript
- Unity
ss.app.canRequestReview; // true / false
// true / false
bool result = SS_App.CanReview();
Use this property to check the support for adding a review on the current platform. It also checks the ability to add a review again.
- JavaScript
- Unity
if (ss.app.canRequestReview) {
// can request a review
}
if (SS_App.CanReview()) {
// can request a review
}
Check if a review has already been left
FREE- JavaScript
- Unity
ss.app.isAlreadyReviewed; // true / false
Not implemented
Use SS_App.CanReview() instead
Use this property to check if a review has already been left.
- JavaScript
- Unity
if (ss.app.isAlreadyReviewed) {
// review has already been left
}
if (!SS_App.CanReview()) {
// review has already been left
}
On some platforms, it is possible to change the rating. To check this, use the following combination:
- JavaScript
- Unity
if (ss.app.isAlreadyReviewed && ss.app.canRequestReview) {
// review has been left, but it can be changed
}
Not implemented
Response fields
Field | Type | Description | Example |
---|---|---|---|
success | boolean | Whether the player has rated the game | true |
rating | number | The player's rating. 0 - not supported | 5 |
error | string | Error code | unsupported |
Error codes
Error | Error description |
---|---|
unsupported | The method is not supported on the platform |
not_allowed | The method cannot be called (for example, the player is not authorized) |
already_rated | The review has already been submitted, resubmission is not available |
cancelled | The review window was closed |
others | Any unexpected errors (check the console) |
Stay in Touch
Other documents of this chapter available Here. To get started, welcome to the Tutorials chapter.
SpellSync Community Telegram
: @spellsync.
For your suggestions e-mail
: [email protected]
We Wish you Success!