The Ocean Base JNI Library provides a Java Native Interface for Android.
More...
|
jboolean | Java_com_meta_ocean_base_BaseJni_initialize (JNIEnv *env, jobject javaThis, jstring messageOutputType) |
| Java native interface function to initialize the Ocean Framework. More...
|
|
jboolean | Java_com_meta_ocean_base_BaseJni_initializeWithMessageOutput (JNIEnv *env, jobject javaThis, jint messageOutputType, jstring outputFile) |
| Java native interface function to initialize the Ocean Framework. More...
|
|
jboolean | Java_com_meta_ocean_base_BaseJni_setCurrentActivity (JNIEnv *env, jobject javaThis, jobject activity) |
| Java native interface function to set the current activity. More...
|
|
jboolean | Java_com_meta_ocean_base_BaseJni_forceProcessorCoreNumber (JNIEnv *env, jobject javaThis, jint cores) |
| Forces a specific number of processor cores. More...
|
|
jboolean | Java_com_meta_ocean_base_BaseJni_setWorkerPoolCapacity (JNIEnv *env, jobject javaThis, jint capacity) |
| Sets or changes the maximal capacity of the worker pool. More...
|
|
void | Java_com_meta_ocean_base_BaseJni_debug (JNIEnv *env, jobject javaThis, jstring message) |
| Java native interface function to forward a debug message to the framework. More...
|
|
void | Java_com_meta_ocean_base_BaseJni_information (JNIEnv *env, jobject javaThis, jstring message) |
| Java native interface function to forward an information message to the framework. More...
|
|
void | Java_com_meta_ocean_base_BaseJni_warning (JNIEnv *env, jobject javaThis, jstring message) |
| Java native interface function to forward an information message to the framework. More...
|
|
void | Java_com_meta_ocean_base_BaseJni_error (JNIEnv *env, jobject javaThis, jstring message) |
| Java native interface function to forward an information message to the framework. More...
|
|
jstring | Java_com_meta_ocean_base_BaseJni_popMessages (JNIEnv *env, jobject javaThis) |
| Pops all messages that a currently waiting in the message queue. More...
|
|
void | Java_com_meta_ocean_base_BaseJni_exit (JNIEnv *env, jobject javaThis, jint exitValue) |
| Exits the application by invoking the exit() command. More...
|
|
The Ocean Base JNI Library provides a Java Native Interface for Android.
The library is available on Android platforms only.
◆ Java_com_meta_ocean_base_BaseJni_debug()
void Java_com_meta_ocean_base_BaseJni_debug |
( |
JNIEnv * |
env, |
|
|
jobject |
javaThis, |
|
|
jstring |
message |
|
) |
| |
◆ Java_com_meta_ocean_base_BaseJni_error()
void Java_com_meta_ocean_base_BaseJni_error |
( |
JNIEnv * |
env, |
|
|
jobject |
javaThis, |
|
|
jstring |
message |
|
) |
| |
Java native interface function to forward an information message to the framework.
- Parameters
-
env | The JNI environment |
javaThis | The JNI object |
message | The error message to forward |
- See also
- Java_com_meta_ocean_NativeInterface_information(), Java_com_meta_ocean_NativeInterface_warning().
◆ Java_com_meta_ocean_base_BaseJni_exit()
void Java_com_meta_ocean_base_BaseJni_exit |
( |
JNIEnv * |
env, |
|
|
jobject |
javaThis, |
|
|
jint |
exitValue |
|
) |
| |
Exits the application by invoking the exit() command.
Beware: Commonly Android decides whether an application will be terminated or not so that this function should be a workaround only.
- Parameters
-
env | The JNI environment |
javaThis | The JNI object |
exitValue | The exit value to be used |
◆ Java_com_meta_ocean_base_BaseJni_forceProcessorCoreNumber()
jboolean Java_com_meta_ocean_base_BaseJni_forceProcessorCoreNumber |
( |
JNIEnv * |
env, |
|
|
jobject |
javaThis, |
|
|
jint |
cores |
|
) |
| |
Forces a specific number of processor cores.
- Parameters
-
env | The JNI environment |
javaThis | The JNI object |
cores | CPU cores to be forced during initialization |
- Returns
- True, if succeeded
◆ Java_com_meta_ocean_base_BaseJni_information()
void Java_com_meta_ocean_base_BaseJni_information |
( |
JNIEnv * |
env, |
|
|
jobject |
javaThis, |
|
|
jstring |
message |
|
) |
| |
Java native interface function to forward an information message to the framework.
- Parameters
-
env | The JNI environment |
javaThis | The JNI object |
message | The information message to forward |
- See also
- Java_com_meta_ocean_NativeInterface_warning(), Java_com_meta_ocean_NativeInterface_error().
◆ Java_com_meta_ocean_base_BaseJni_initialize()
jboolean Java_com_meta_ocean_base_BaseJni_initialize |
( |
JNIEnv * |
env, |
|
|
jobject |
javaThis, |
|
|
jstring |
messageOutputType |
|
) |
| |
Java native interface function to initialize the Ocean Framework.
Several individual message output types can be specified and combined:
- "OUTPUT_STANDARD": To write all messages to the standard output (e.g., std::cout on desktop platforms, or Android logcat on Android platforms).
- "OUTPUT_QUEUED": To queue all messages and to explicitly pop the messages later (e.g., to display messages in a debug window).
- "<filename>": To write all messages to a define file.
- Parameters
-
env | The JNI environment, must be valid |
javaThis | The JNI Base object |
messageOutputType | The type of the message output to be used, empty to use 'OUTPUT_STANDARD' |
- Returns
- True, if succeeded
◆ Java_com_meta_ocean_base_BaseJni_initializeWithMessageOutput()
jboolean Java_com_meta_ocean_base_BaseJni_initializeWithMessageOutput |
( |
JNIEnv * |
env, |
|
|
jobject |
javaThis, |
|
|
jint |
messageOutputType, |
|
|
jstring |
outputFile |
|
) |
| |
Java native interface function to initialize the Ocean Framework.
- Parameters
-
env | The JNI environment, must be valid |
javaThis | The JNI Base object |
messageOutputType | The type of the message output to be used. |
outputFile | The name of the file to which messages will be written, 'messageOutputType' must contain 'OUTPUT_FILE', empty otherwise |
- Returns
- True, if succeeded
◆ Java_com_meta_ocean_base_BaseJni_popMessages()
jstring Java_com_meta_ocean_base_BaseJni_popMessages |
( |
JNIEnv * |
env, |
|
|
jobject |
javaThis |
|
) |
| |
Pops all messages that a currently waiting in the message queue.
- Parameters
-
env | The JNI environment |
javaThis | The JNI object |
- Returns
- The messages that have been popped.
◆ Java_com_meta_ocean_base_BaseJni_setCurrentActivity()
jboolean Java_com_meta_ocean_base_BaseJni_setCurrentActivity |
( |
JNIEnv * |
env, |
|
|
jobject |
javaThis, |
|
|
jobject |
activity |
|
) |
| |
Java native interface function to set the current activity.
- Parameters
-
env | The JNI environment, must be valid |
javaThis | The JNI Base object |
activity | The current activity to be set or updated, can be nullptr to remove the previously set activity |
- Returns
- True, if succeeded
◆ Java_com_meta_ocean_base_BaseJni_setWorkerPoolCapacity()
jboolean Java_com_meta_ocean_base_BaseJni_setWorkerPoolCapacity |
( |
JNIEnv * |
env, |
|
|
jobject |
javaThis, |
|
|
jint |
capacity |
|
) |
| |
Sets or changes the maximal capacity of the worker pool.
- Parameters
-
env | The JNI environment |
javaThis | The JNI object |
capacity | The maximal number of worker objects the worker pool may provide |
- Returns
- True, if succeeded
◆ Java_com_meta_ocean_base_BaseJni_warning()
void Java_com_meta_ocean_base_BaseJni_warning |
( |
JNIEnv * |
env, |
|
|
jobject |
javaThis, |
|
|
jstring |
message |
|
) |
| |
Java native interface function to forward an information message to the framework.
- Parameters
-
env | The JNI environment |
javaThis | The JNI object |
message | The warning message to forward |
- See also
- Java_com_meta_ocean_NativeInterface_information(), Java_com_meta_ocean_NativeInterface_error().