WVR_IsDeviceTableStatic

WVR_EXPORT bool WVR_IsDeviceTableStatic(WVR_DeviceType type)

Lets the developer know if WVR_DeviceType keeps static on table.

Return
True means device keeps static; false means device is moving.
Version
API Level 8
Parameters

How to use

Here is an example for the function:

#include <wvr/wvr_device.h>
#include <wvr/wvr_types.h>

// somewhere listen controller static state
if (event.common.type == WVR_EventType_DeviceTableStaticLocked) {  // got event of user put controller down
    LOGD("Device %u has been put down.", event.device.deviceType);
} else if (event.common.type == WVR_EventType_DeviceTableStaticUnlocked) {  // got event of user picked controller up
    LOGD("Device %u has been picked up.", event.device.deviceType);
}

//checking if right controller is keeping static on table
if(WVR_IsDeviceTableStatic(WVR_DeviceType_Controller_Right)
    LOGD("The right controller is static on table.");

//checking if left Controller is holding by user
if(!WVR_IsDeviceTableStatic(WVR_DeviceType_Controller_Left))
    LOGD("The left controller is on hand.");