Ocean
DevicesAndroidJni.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) Meta Platforms, Inc. and affiliates.
3  *
4  * This source code is licensed under the MIT license found in the
5  * LICENSE file in the root directory of this source tree.
6  */
7 
8 #ifndef META_OCEAN_DEVICES_ANDROID_JNI_DEVICESANDROIDJNI_H
9 #define META_OCEAN_DEVICES_ANDROID_JNI_DEVICESANDROIDJNI_H
10 
12 
13 /**
14  * Java native interface function to register the Devices::Android component.
15  * @param env The JNI environment
16  * @param javaThis The JNI object
17  * @return True, if succeeded
18  * @ingroup devicesandroid
19  */
20 extern "C" jboolean Java_com_meta_ocean_devices_android_DevicesAndroidJni_registerLibrary(JNIEnv* env, jobject javaThis);
21 
22 /**
23  * Java native interface function to unregister the Devices::Android component.
24  * @param env The JNI environment
25  * @param javaThis The JNI object
26  * @return True, if succeeded
27  * @ingroup devicesandroid
28  */
29 extern "C" jboolean Java_com_meta_ocean_devices_android_DevicesAndroidJni_unregisterLibrary(JNIEnv* env, jobject javaThis);
30 
31 /**
32  * Java native interface function to send a new GPS location to the native side.
33  * @param env The JNI environment
34  * @param javaThis The JNI object
35  * @param latitude The position's latitude, in degree, always valid, with range [-90, 90]
36  * @param longitude The position's longitude, in degree, must be valid, with range [-180, 180]
37  * @param altitude The position's altitude, in meter, NumericF::minValue() if unknown
38  * @param direction The travel direction of the device, relative to north, in degree, north is 0 degree, east is 90 degree, with range [0, 360], -1 if unknown
39  * @param speed The device's speed, in meter per second, with range [0, infinity), -1 if unknown
40  * @param accuracy The horizontal accuracy as radius, in meter, with range [0, infinity), -1 if unknown
41  * @param altitudeAccuracy The vertical accuracy in meter, with range [0, infinity), -1 if unknown
42  * @param directionAccuracy The direction accuracy, in degree, with range [0, 180], -1 if unknown
43  * @param speedAccuracy The speed accuracy, in meter per second, with range [0, infinity), -1 if unknown
44  * @param timestamp The unix timestamp of the GPS location
45  * @return True, if succeeded
46  * @ingroup devicesandroid
47  */
48 extern "C" jboolean Java_com_meta_ocean_devices_android_DevicesAndroidJni_newGPSLocation(JNIEnv* env, jobject javaThis, jdouble latitude, jdouble longitude, jfloat altitude, jfloat direction, jfloat speed, jfloat accuracy, jfloat altitudeAccuracy, jfloat directionAccuracy, jfloat speedAccuracy, jdouble timestamp);
49 
50 #endif // META_OCEAN_DEVICES_ANDROID_JNI_DEVICESANDROIDJNI_H
jboolean Java_com_meta_ocean_devices_android_DevicesAndroidJni_unregisterLibrary(JNIEnv *env, jobject javaThis)
Java native interface function to unregister the Devices::Android component.
jboolean Java_com_meta_ocean_devices_android_DevicesAndroidJni_registerLibrary(JNIEnv *env, jobject javaThis)
Java native interface function to register the Devices::Android component.
jboolean Java_com_meta_ocean_devices_android_DevicesAndroidJni_newGPSLocation(JNIEnv *env, jobject javaThis, jdouble latitude, jdouble longitude, jfloat altitude, jfloat direction, jfloat speed, jfloat accuracy, jfloat altitudeAccuracy, jfloat directionAccuracy, jfloat speedAccuracy, jdouble timestamp)
Java native interface function to send a new GPS location to the native side.