Ага, как впарить саппорт по поиску котов Шреденгера
class C02392 implements Comparator<BluetoothDevice> {
C02392() {
} if (device1.getType() == 2 && device2.getType() != 2) {
return 1;
}
if (device1.getType() != 2 && device2.getType() == 2) {
return -1;
}
}
return device1.getAddress().compareTo(device2.getAddress());
}
}
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
BluetoothDevice device = (BluetoothDevice) DeviceDiscoveryActivity.this.scanList.getItemAtPosition(i);
try {
Method m = device.getClass().getDeclaredMethod("sdpSearch", new Class[]{ParcelUuid.class});
String str = "0000110a-0000-1000-8000-00805f9b34fb";
str = "00001200-0000-1000-8000-00805f9b34fb";
String str2 = "00001800-0000-1000-8000-00805f9b34fb";
} catch (Exception e) {
e.printStackTrace();
}
DeviceDiscoveryActivity.this.fetchSdp(device);
}
}
} else {
int status = intent.getIntExtra("android.bluetooth.device.extra.SDP_SEARCH_STATUS", -1);
BluetoothDevice device = (BluetoothDevice) intent.getParcelableExtra("android.bluetooth.device.extra.DEVICE");
ParcelUuid uuid = (ParcelUuid) intent.getParcelableExtra("android.bluetooth.device.extra.UUID");
Log.d(DeviceDiscoveryActivity.TAG, "Mac: " + device.getAddress() + " | Action: " + action + " | Status: " + status + " | SDP: " + intent.getParcelableExtra("android.bluetooth.device.extra.EXTRA_SDP_RECORD") + " | UUID: " + uuid);
}
}
}
24-92-0E (hex) мак Samsung Electronics Co.,Ltd
Log.d(TAG, deviceHardwareAddress + ", " + deviceName + ", " + btClass.getDeviceClass());
if (deviceHardwareAddress == "24:92:0E:64:21:7D") { // Ваще сказки
this.btAdapter.cancelDiscovery();
}
private String foo(BluetoothDevice device) {
int i = 0;
Parcelable[] uuids = device.getUuids();
String macPrefix = device.getAddress().substring(0, 8);
int majorDeviceClass = device.getBluetoothClass().getMajorDeviceClass();
if (uuids != null) {
int length = uuids.length;
while (i < length) {
Parcelable uuid = uuids[i];
if ("fecacade-afde-cade-defa-cade00000000".equals(uuid.toString())) {
return "ios";
}
if ("a822c885-af02-c780-9d4d-bd9a1fa06d93".equals(uuid.toString())) {
return "android";
}
if ("00df0ca9-80bb-4f9f-5c49-06cb1eb49ea4".equals(uuid.toString())) {
return "tizen";
}
i++;
}
}
Кароче American Style: если ты араб из Ирана и говоришь Аллах акбар - ты террорист.
в коде одни request/get/fetch/search/discovery/parse/comapre/...