GameActivity

#include <GameActivity.h>

This structure defines the native side of an android.app.GameActivity.

Summary

It is created by the framework, and handed to the application's native code as it is being launched.

Public attributes

assetManager
AAssetManager *
Pointer to the Asset Manager instance for the application.
callbacks
Pointer to the callback function table of the native application.
env
JNIEnv *
JNI context for the main thread of the app.
externalDataPath
const char *
Path to this application's external (removable/mountable) data directory.
instance
void *
This is the native instance of the application.
internalDataPath
const char *
Path to this application's internal data directory.
javaGameActivity
jobject
The GameActivity object handle.
obbPath
const char *
Available starting with Honeycomb: path to the directory containing the application's OBB files (if any).
sdkVersion
int32_t
The platform's SDK version code.
vm
JavaVM *
The global handle on the process's Java VM.

Public attributes

assetManager

AAssetManager * GameActivity::assetManager

Pointer to the Asset Manager instance for the application.

The application uses this to access binary assets bundled inside its own .apk file.

callbacks

struct GameActivityCallbacks * GameActivity::callbacks

Pointer to the callback function table of the native application.

You can set the functions here to your own callbacks. The callbacks pointer itself here should not be changed; it is allocated and managed for you by the framework.

env

JNIEnv * GameActivity::env

JNI context for the main thread of the app.

Note that this field can ONLY be used from the main thread of the process; that is, the thread that calls into the GameActivityCallbacks.

externalDataPath

const char * GameActivity::externalDataPath

Path to this application's external (removable/mountable) data directory.

instance

void * GameActivity::instance

This is the native instance of the application.

It is not used by the framework, but can be set by the application to its own instance state.

internalDataPath

const char * GameActivity::internalDataPath

Path to this application's internal data directory.

javaGameActivity

jobject GameActivity::javaGameActivity

The GameActivity object handle.

obbPath

const char * GameActivity::obbPath

Available starting with Honeycomb: path to the directory containing the application's OBB files (if any).

If the app doesn't have any OBB files, this directory may not exist.

sdkVersion

int32_t GameActivity::sdkVersion

The platform's SDK version code.

vm

JavaVM * GameActivity::vm

The global handle on the process's Java VM.