4S Device Communication Module Collection  Version 0.6-SNAPSHOT
Full documentation of the modules in the 4SDC collection (aimed at 4SDC module developers)
PAL::Android Class Reference

Handles to the Java VM running our Android service. More...

#include <android.h>

+ Collaboration diagram for PAL::Android:

Static Public Member Functions

static JavaVM * getJavaVM ()
 Get a pointer to the Java VM instance used to connect to Android. More...
 
static jobject getClassLoader ()
 Get a global reference to the Java ClassLoader. More...
 
static jobject getContext ()
 Get a global reference to the Android Context. More...
 
static void setContext (jobject contextRef)
 Provide a reference to the Android Context. More...
 

Detailed Description

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.

Member Function Documentation

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.

+ Here is the caller graph for this function:

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.

+ Here is the call graph for this function:

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.

+ Here is the caller graph for this function:

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
contextRefA reference of any scope to an android.content.Context object.

+ Here is the caller graph for this function:


The documentation for this class was generated from the following files: