VRDeviceService¶
VRDeviceService provides an interface for developers to implement DeviceService. In order to return a tracked device, such as an HMD, controller, or external device to the server.
Device Class¶
Vendor needs to provide vector for VRDevice. The device count and device class need to provided in this function.
// Add Hmd device service.
private Vector<VRDevice> mDevices = new Vector<>();
mDevices.add(new HmdDevice(this));
@Override
public Vector<VRDevice> getDevices() {
return mDevices;
}
Note
This is an abstract function and must be implemented.
Bind Service¶
@Override
public IBinder onBind(Intent intent) {
return super.onBind(intent);
}
Note
If onBind function needs to be overriden, it must call super.onBind().
@Override
public void onRebind(Intent intent) {
return super.onRebind(intent);
}
Note
If onRebind function needs to be overriden, it must call super.onRebind()
@Override
public boolean onUnbind(Intent intent) {
return super.onUnbind(intent);
}
Note
If onUnbind function needs to be overriden, it must call super.onUnbind()