List of usage examples for android.view InputDevice isVirtual
public boolean isVirtual()
From source file:com.goodhustle.ouyaunitybridge.OuyaUnityActivity.java
private ArrayList<Device> checkDevices() { //Get a list of all device id's and assign them to players. ArrayList<Device> devices = new ArrayList<Device>(); int[] deviceIds = InputDevice.getDeviceIds(); for (int count = 0; count < deviceIds.length; count++) { InputDevice d = InputDevice.getDevice(deviceIds[count]); if (!d.isVirtual()) { Device device = new Device(); device.id = d.getId();// w w w. ja v a 2s .c o m device.player = OuyaController.getPlayerNumByDeviceId(device.id); if (device.player != DEVICE_NOT_OUYACONTROLLER_COMPATIBLE) { device.name = d.getName(); devices.add(device); } } } return devices; }