What is the 'Activity' variable to be set to AndroidPlatformConfiguration?

I don't have a full native app, I have my game engine in C++ and linked to java in order to render and process my game. I even pass the android events to the engine and process them there, so I'd want to use the Google Play game services from C++.

Then I don't have an android_main entry as in the samples of Google.

I already tried it with:

  • the context object of java activity (jobject).
  • thiz object, that is passed in each native call.
  • the class of the main activity of Java (jclass)

and when I call Valid() on the Platform Configuration object, it always returns false.

I also have the JNI_OnLoad(vm) called

jint JNI_OnLoad(JavaVM *vm, void *reserved) {
    javaVM = vm;


    return JNI_VERSION_1_6;


gpg::AndroidPlatformConfiguration platform_configuration;
platform_configuration.SetActivity(Activity); //What is this Activity?