06-02-2015 10:22 AM
06-05-2015 03:23 PM
07-13-2015 03:08 PM
07-21-2015 01:19 PM
//-----------------------------------------------------------------
// Device Feature Support
// These can be called any time from any thread.
//-----------------------------------------------------------------
OVR_VRAPI_EXPORT int ovr_GetSystemProperty( const ovrJava * java, const ovrSystemProperty prop );
//-----------------------------------------------------------------
// Device Status
//
// Note that there is currently no way to tell what the initial dock/mount state
// is when the vrapi_Initialize() is first called. Only when the state changes after
// vrapi_Initialize() has been called we can tell what the real state is. To work
// around this problem, we assume the device is docked and the headset is mounted
// when we enter VR mode, and no dock/mount state changes have been recorded up
// to that point. Under normal circumstances this is usually correct. This is
// incorrect when in developer mode, but in that case you want the device to
// appear as docked and the headset as mounted anyway.
//
// These can be called any time from any thread.
//-----------------------------------------------------------------
// Can be used to detect when the device is docked/undocked.
OVR_VRAPI_EXPORT bool ovr_DeviceIsDocked();
// Can be used to detect when the device is mounted/unmounted.
OVR_VRAPI_EXPORT bool ovr_HeadsetIsMounted();
07-21-2015 04:31 PM
07-22-2015 07:55 AM
07-29-2015 10:57 AM
08-04-2015 01:06 PM
@Override
protected void onResume() {
super.onResume();
IntentFilter intentFilter = new IntentFilter(
"android.intent.action.proximity_sensor");
mReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
if(intent.getType().equals("1"))
{
Log.v(LOGTAG,"headset mounted");
}
else
{
Log.v(LOGTAG,"headset unmounted");
}
}
};
this.registerReceiver(mReceiver, intentFilter);
}
@Override
protected void onPause() {
super.onPause();
unregisterReceiver(mReceiver);
}
<intent-filter>
<action android:name="android.intent.action.proximity_sensor" />
</intent-filter>
10-08-2015 09:30 AM
06-15-2016 12:48 AM