# 5. SDK Sample

# 5.1 QiyuVR_NativeActivity

QiyuVR_NativeActivity shows how to use the Android Native of OpenGL ES. Sample scene shows including but not limited to: simple teapot models, controller models and Recenter functions. QiyuVR_NativeActivity_fmod is same as QiyuVR_NativeActivity except adding the fmod library and audio.

 ************************************************
 *ATTENTION! <TriggerR> <<Right Controller>> to Switch the TestGroup(refer to 'enum TestGroup').
 ************************
 *TestGroup*:<<< TG_Default >>>
 **<<Right Controller>>
 ***<GripR> 	- vibrate this controller(amplitude:0.5f, duration:200.0f);
				  test FMOD, playSound2.
 ***<Press_A> 	- qiyu_SetTrackingOriginMode, switch between GroundMode and DeviceMode.
				  test FMOD, playSound3.
 ***<Press_B> 	- switch between 4 qiyu_FoveationLevel(FL_None, FL_Low, FL_Medium, FL_High, FL_Custom).
 **<<Left Controller>>
 ***<TriggerL>	- vibrate this controller(amplitude:1.0f, duration:4.0f).
 				  test FMOD, playSound1.
 ***<GripL>		- stop vibrate this controller. (press to rotate the teapot; release will stop the teapots.);
 ***<Press_X> 	- test eye buffer size changed. switch between scale 0.7f and 0.2f.
 ***<Press_Y> 	- swith between MultiView and MultiPass. when MultiView test color is Red/Green for Left/Right eye.
 ************************
 *TestGroup*:<<< TG_QiyuPlatform >>>
 **<<Right Controller>>
 ***<Press_A> 	- test__qiyu_Platform_Init
 ***<Press_B> 	- test__qiyu_Platform_GetAccountInfo
 **<<Left Controller>>
 ***<GripL> 	- test__qiyu_Platform_GetDeepLink
 ***<Touch_X> 	- test__qiyu_Platform_IsAccountLogin
 ************************
 *TestGroup*:<<< TG_QiyuPrefs >>>
 **<<Right Controller>>
 ***<Press_A> 	- test__init_QiyuPrefs
 ***<Press_B> 	- test__set_QiyuPrefs
 ***<Touch_B> 	- test__get_QiyuPrefs
 **<<Left Controller>>
 ***<Press_X> 	- test__hasKey_QiyuPrefs
 ***<Press_Y> 	- test__delKey_QiyuPrefs
 ***<TriggerL> 	- test__delALL_QiyuPrefs
 ***<GripL> 	- test__save_QiyuPrefs
 ************************
 *TestGroup*:<<< TG_Boundary >>>
 **<<Right Controller>>
 ***<Press_B>	- qiyu_GetBoundaryGeometry.
 **<<Left Controller>>
 ***<TriggerL>	- qiyu_GetBoundaryDimensions.
 ***<Press_X> 	- qiyu_IsBoundaryVisible.
 ***<Press_Y> 	- qiyu_IsBoundaryBelowHeadVisible.
 ************************
 ************************************************

# 5.2 teapots\more-teapots

Please refer to the reference: https://github.com/android/ndk-samples.git (opens new window)

Setting more-teapots as the VR mode

Recommended the way to load library:

in void android_main(android_app* state)

using ndk_helper::JNIHelper::GetInstance()->Init(state->activity, HELPER_CLASS_NAME, "qiyuapi");to load the library.