WVR_GetChargeStatus

WVR_EXPORT WVR_ChargeStatus WVR_GetChargeStatus(WVR_DeviceType type)

Get the current charging status.

Return
The charging status. (refer to WVR_ChargeStatus)
Parameters
  • type -

    Type of the device to get the InputDeviceState. (refer to WVR_DeviceType)

How to use

Here is an example for the function:

#include <wvr/wvr_status.h>

// To get HMD device Charge Status

WVR_ChargeStatus status;
Status = WVR_GetChargeStatus(WVR_DeviceType_HMD);

switch(Status)
{
    case WVR_ChargeStatus_Unknown:
        LOGI("HMD Device Charge Status is Unknown.");
        break;
    case WVR_ChargeStatus_Discharging:
        LOGI("HMD Device is Discharging.");
        break;
    case WVR_ChargeStatus_Charging:
        LOGI("HMD Device is Charging now.");
        break;
    case WVR_ChargeStatus_Full:
        LOGI("HMD Device Charge Status is Full.");
        break;
}

Charge Status includes the following below:

enum WVR_ChargeStatus

The charging status.

Values:

WVR_ChargeStatus_Unknown = 0
WVR_ChargeStatus_Discharging = 1

device doesn’t charge currently.

WVR_ChargeStatus_Charging = 2

device is charging.

WVR_ChargeStatus_Full = 3

battery capacity of device is full.