Handles to the Java VM running our Android service.
More...
#include <android.h>
This class bridges the C++ and Java worlds of the Android service by providing the handles into the Android/Java world needed by the C++ components of the PAL layer.
jobject Android::getClassLoader |
( |
| ) |
|
|
static |
Acquire a global reference to a Java ClassLoader that will be capable of loading PAL-layer classes (the reference will be valid until the application terminates).
- Returns
- The java.lang.ClassLoader global reference.
jobject Android::getContext |
( |
| ) |
|
|
static |
Acquire a global reference to the Android Context (the reference will be valid until the application terminates).
- See also
- setContext()
- Returns
- The android.content.Context global reference.
JavaVM * Android::getJavaVM |
( |
| ) |
|
|
static |
This method will return a pointer to the Java VM instance running the Android service.
- Returns
- A pointer to the Java VM.
void Android::setContext |
( |
jobject |
contextRef | ) |
|
|
static |
Provide a reference to the Android Context object which provides the access rights to the system, such as Bluetooth or USB access. The android.content.Context object reference provided may be of any scope, it will be copied into a global reference, which can be accessed later using getContext().
This function must be called exactly once during initialization of the system before the PAL layer modules are initialized, as the modules in the PAL layer may depend on this reference being available during initialization.
- See also
- getContext()
- Parameters
-
contextRef | A reference of any scope to an android.content.Context object. |
The documentation for this class was generated from the following files: