Reviews
Suggest to the player to leave a review for the game.
Request Review
FREE- JavaScript
- Construct 3
- Unity
gp.app.requestReview();
→
System
On start of layoutAdd action
Legend
System
GamePush
System›Construct 3 System object
GamePush›GamePush plugin
GP_App.ReviewRequest();
The method returns the success of the operation and the rating, see response fields.
- JavaScript
- Construct 3
- Unity
const result = await gp.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!');
}
}
→
System
On start of layoutAdd action
result.success / result.rating / result.error
Add action
we are very glad you enjoyed the game!
Add action
thank you for your review!
Add action
thank you for your review!
Add action
thank you for your review! (rating not available)
Add action
we will strive to do better!
Add action
we will strive to do better!
Add action
Legend
System
GamePush
Text
System›Construct 3 System object
GamePush›GamePush plugin
Text — Object Text (Text)
public void ReviewRequest()
{
GP_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
- Construct 3
- Unity
gp.app.canRequestReview; // true / false
true / false
Add action
Legend
GamePush
GamePush›GamePush plugin
// true / false
bool result = GP_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
- Construct 3
- Unity
if (gp.app.canRequestReview) {
// can request a review
}
can request a review
Add action
Legend
GamePush
GamePush›GamePush plugin
if (GP_App.CanReview()) {
// can request a review
}
Check if a review has already been left
FREE- JavaScript
- Construct 3
- Unity
gp.app.isAlreadyReviewed; // true / false
true / false
Add action
Legend
GamePush
GamePush›GamePush plugin
// true / false
GP_App.IsAlreadyReviewed();
Use this property to check if a review has already been left.
- JavaScript
- Construct 3
- Unity
if (gp.app.isAlreadyReviewed) {
// review has already been left
}
review has already been left
Add action
Legend
GamePush
GamePush›GamePush plugin
if (GP_App.IsAlreadyReviewed())) {
// review has already been left
}
On some platforms, it is possible to change the rating. To check this, use the following combination:
- JavaScript
- Construct 3
- Unity
if (gp.app.isAlreadyReviewed && gp.app.canRequestReview) {
// review has been left, but it can be changed
}
Add action
review has been left, but it can be changed
Add action
Legend
GamePush
GamePush›GamePush plugin
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.
GamePush Community Telegram: @gs_community.
For your suggestions e-mail: official@gamepush.com
We Wish you Success!