SDKBOX plugin Review

Hi,

I tried to implement plugin review months ago, but finally, as I don’t understand how it works, I gave up.

Now I’m working in a new game, and I’m in the same situation. I would like to add review on all my games.

What I don’t understand is the usage of the sdkbox_config.json, I have it like this:

“Review”: {
“LaunchLimit”: 3,
“DayForReminding”: 1,
“tryPromptWhenInit”: true,
“DayLimit”: 0,
“LaunchForReminding”: 2,
“UserEventLimit”: 3
},

and

sdkbox::PluginReview::init();
sdkbox::PluginReview::setListener(new RVListener());
sdkbox::PluginReview::show(false);

and in other class I try to “increase counter”? doing:

sdkbox::PluginReview::userDidSignificantEvent(true);

Reading doc it looks like it have to show it automatically without the need of doing it manually.
This is what doc says:
image

It looks like it doesn’t matter what I put in sdkbox_config.json, it only show the review if I set show() to true.

What I want is, when user play the game 3 times, then show the review.

I would like to do something like:

if (sdkbox::PluginReview::getUserDidSignificantEvents() == 3){
sdkbox::PluginReview::show(true);
}

How to know the userEventLimit? or what is the proper way to show the review?

I’m using cocos2dx-v.17.2 with Android

show(true) will force show review dialog (ignore config in sdkbox_config.json)

review dialog show just when all condition reached.

“Review”: {
“LaunchLimit”: 3,  // app launch times
“DayForReminding”: 1, // days for user click remind button when review dialog show
“tryPromptWhenInit”: true, // try show review dialog when you call PluginReview.init
“DayLimit”: 0, // day after first lauch
“LaunchForReminding”: 2, // launch times for user click remind button when review dialog show
“UserEventLimit”: 3 // user event,  you can call `userDidSignificantEvent` to increase this count
}

following config, will show review after user launch app three times.( tryPromptWhenInit is true, so review dialog will show when plugin.init). if user click remind button, then review show again after next three times launch.

“Review”: {
“LaunchLimit”: 3,
“DayForReminding”: 0,
“tryPromptWhenInit”: true,
“DayLimit”: 0,
“LaunchForReminding”: 3,
“UserEventLimit”: 0
}

by the way, you can check PluginReview.h for more detail.

Thanks for the answer.

I have some different scenes, LoadingScene, MainMenuScene, another 2 scenes from the MianMenuScene and the GameScene. I only wanted to show the review if the user enter 3 times in the GameScene, so I wanted to use the UserEventLimit property with ::userDidSignificantEvent(true).

I ended up using an UserDefault variable and increasing it until it reaches the required number and then show up the review… If user clicks the review button, review popup will never show again (until user don’t remove the data of the game or reinstall it) and if user click any other button I restore the value of the variable again.

I know its not the proper way to do it but it’s doing the trick for now…

you can do like this:

“Review”: {
“LaunchLimit”: 0,
“DayForReminding”: 0,
“tryPromptWhenInit”: false,
“DayLimit”: 0,
“LaunchForReminding”: 3,
“UserEventLimit”: 3
}

use above config, and call userDidSignificantEvent(true) when enter GameScene.

I remember I have tried with:

“LaunchLimit”: 0,
“DayForReminding”: 0,
“tryPromptWhenInit”: false,
“DayLimit”: 0,
“LaunchForReminding”: 0,
“UserEventLimit”: 3
}

But it always showed the popup, like if I put “UserEventLimit” to 1. Looks like default is 0 (false) and any other value, like 3 (true).

Then I’m not sure if I pressed “no thanks” button and it never showed up anymore, even removing and reinstalling the app. Is sdkbox storing anywhere if user clicked “no thanks” button or if have rated the game?

As I would need to know if user have pressed “rate” button or not (the proper way to do it would be knowing if user have really rated it, because user can click cancel button or close the game or something), for the moment I will go with the way I did it and will try to store the value on a server, not sure if I can do it using sdkbox or I have to do it using google services yet

use show(false) try to show rate dialog.

and i change sample with your config.

no thanks's value is store in SharedPreferences.

Generally speaking,
Deleting an app will deletes SharedPreferences.
Reinstalling app willn’t deletes SharedPreferences.

Thank you for taking the time to change the sample for me, really appreciate it! I was on hollydays, I will try it in the next few days!

Thank you so much!