CocosCreator SDKBOX PluginReview integration

I would like to display the Rate the app button on click of a button in the app. For that I have installed the PluginReview from SDKBOX and also configured the parameters as per the documentation. PFB my code. However my compiled Android code when ran on device never goes inside the if loop as per the logs. Please let me know if this is the correct way of doing it.

if (‘undefined’ != typeof(sdkbox.PluginReview)) {
var plugin = sdkbox.PluginReview;
plugin.setTitle("Thanks ");
plugin.setMessage(“Enjoying the game? Would you mind rating us”);
plugin.setCancelButtonTitle(“No Thanks !!”);
plugin.setRateButtonTitle(“Rate this app”);
plugin.setRateLaterButtonTitle(“Remind Me Later !!”);
plugin.init();
plugin.show();
}

Hey,

I’m interested in knowing this solution too but here’s what I do for rating.

I add a “Rate” feature in my mobile game by using a regular button node and onClick I send the user to the play store (if OS is Android) or app store (if OS is iOS) using the url of my app’s download link.

Cheers.

Hi,

I even thought about doing it this way, but I was not sure or didn’t have much idea on how to do it in cocos creator . If you could share the sample piece of javascript code do it cocos creator for redirection to playstore it would be great.

Thanks

please check your sdkbox_config.json file

you can use plugin.show(true) to force show rate prompt

Here, this is what I’m doing now

// Go to App page
onRate: function () {
    // Check if user has an Android or iOS
    if (cc.sys.os == cc.sys.OS_ANDROID)
        // Send player to Google Play Store
        cc.sys.openURL('https://play.google.com/store/apps/details?id=com.your.app');
    else if (cc.sys.os == cc.sys.OS_IOS)
        // Send player to Apple App Store
        cc.sys.openURL('https://itunes.apple.com/us/app/game/your-id');
}

And then link the rate button node to the onRate function.

Hope that helps!

1 Like

Yes Efares this will help. I wonder how you are dealing with share feature, sdkbox somehow doesnt work for me. I need to give the user share manually for them to unlock few levels.

I got SDKBOX Social Sharing to work but I did it before they integrated SDKBOX into Cocos Creator so I followed the documentation: http://docs.sdkbox.com/en/plugins/share/

But now I’m going to try the new SDKBOX integrated method in Creator: http://docs.sdkbox.com/en/qa/cocos_creator/

And I’ll see how that goes.