How to integrate comment and rate reminder

I want to implement a comment and rate reminder into my app. Is there an API to rate/comment my app from within the game? or would i have to just link them to the iTunes store to do so?

Yep, for iOS there is Appirater, it works well. Asks the player nicely with a dialog at the start of a game.

In you’re AppDelegate.m file, all you need to do is call it at the end of your didFinishLaunchingWithOptions function, e.g:-

    [Appirater setAppId:@"888888888"];     // <<- your apps id here
    [Appirater setDaysUntilPrompt:10];
    [Appirater setUsesUntilPrompt:2];
    [Appirater setSignificantEventsUntilPrompt:-1];
    [Appirater setTimeBeforeReminding:2];
    [Appirater setDebug:NO];                      // <<- set to yes to test it
    [Appirater appLaunched:YES];

I dont have a AppDelegate.m only AppDelegate.h and AppDelegate.cpp and they are in C**. I guess i would need a C** to objC bind of some sort?

Shane K wrote:

I dont have a AppDelegate.m only AppDelegate.h and AppDelegate.cpp and they are in C**. I guess i would need a C** to objC bind of some sort?

It’s in your AppDelegate.mm file (might be a different name). Search your whole project in XCode for the function “didFinishLaunchingWithOptions” and you find it.

I did a search of my project i think maybe you mean AppController.mm?

Is there any easy way of doing this on android?

None that i have come across since learning about Appirater.

Appirater Android, I haven tried it but I imagine you need to call JNI.

To be honest, as long as you have a “Review The App” on the front of your game, I find Android people more likely to click it and rate your game.

@Gav GMTDev How does your button work? I have already decided (since my post 6 hours ago) on not using a reminder anymore but a button instead. All i have come up with is a button that opens the browser to my app on itunes. Have you implemented an in-game rate button?

Shane K wrote:

@Gav GMTDev How does your button work? I have already decided (since my post 6 hours ago) on not using a reminder anymore but a button instead. All i have come up with is a button that opens the browser to my app on itunes. Have you implemented an in-game rate button?

I open the URL “https://play.google.com/store/apps/details?id=com.arrow.mania.game.free”;
Android will catch the URL and offer to the user to open it in the Play app.

I call JNI to open the URL, the JNI code is in my main activity and looks like:

    public static int OpenURL()
    {
        Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse(vector.message));
        me.startActivity(i);

        return 0;
    }

You now want to know how to call JNI don’t you?

1 Like

I have not implemented the Android click to rate but i have done the iOS part using http://www.cocos2d-x.org/boards/6/topics/11290?r=29092 The iOS parts works but i have not tried the Android part. I am going to assume it works though

@Gav GMTDev Does apple catch links like android does? Like you mentioned in a previous post that android catches the link and offers to open in google play but does apple do the same? So will apple open itunes if i open an itunes link in the browser because i believe that you can only rate an app through itunes app store?? is there a specific link to rate an app? If there is where can i find it?

Shane K wrote:

@Gav GMTDev Does apple catch links like android does? Like you mentioned in a previous post that android catches the link and offers to open in google play but does apple do the same? So will apple open itunes if i open an itunes link in the browser because i believe that you can only rate an app through itunes app store?? is there a specific link to rate an app? If there is where can i find it?

Yes it does. I just open my URL, same as in a browser: “https://itunes.apple.com/ca/app/arrow-mania-free/id534574804?mt=8”. Needs to be done in ObjC, I have a sample app with call ObjC here: http://www.gmtdev.com/blog/2012/04/18/calling-ios-obj-c-from-cocos2d-x-and-more/

Download that and add this function:

bool ObjCCalls::OpenURL(const char *url)
{
    return [[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithCString:url encoding:NSUTF8StringEncoding]]];
}

And from your app just call your app store URL like:
ObjCCalls::OpenURL(“https://itunes.apple.com/ca/app/arrow-mania-free/id534574804?mt=8”.);

…………………
Note, there are old things on the net saying to use URLs in the scheme of “http://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=534574804”…. but I find they don’t work anymore.

What happens if you click the rate app button while in XCode simulator? does it work for you? Mine gives me an error about it being an invalid link