@Test public void testCreateUUID() { assertEquals("0000180f-0000-1000-8000-00805f9b34fb", Neatle.createUUID(0x180f).toString()); assertEquals("00000000-0000-1000-8000-00805f9b34fb", Neatle.createUUID(0).toString()); assertEquals("0000ffff-0000-1000-8000-00805f9b34fb", Neatle.createUUID(-1).toString()); }
public static UUID createUUID(int uuid) { final String base = "-0000-1000-8000-00805F9B34FB"; return UUID.fromString(String.format("%08X", uuid & 0xFFFF) + base); }
Neatle { public static UUID createUUID(int uuid) { final String base = "-0000-1000-8000-00805F9B34FB"; return UUID.fromString(String.format("%08X", uuid & 0xFFFF) + base); } }
Neatle { public static UUID createUUID(int uuid) { final String base = "-0000-1000-8000-00805F9B34FB"; return UUID.fromString(String.format("%08X", uuid & 0xFFFF) + base); } private  Neatle(); }
Neatle { public static UUID createUUID(int uuid) { final String base = "-0000-1000-8000-00805F9B34FB"; return UUID.fromString(String.format("%08X", uuid & 0xFFFF) + base); } private  Neatle(); static CharacteristicSubscription createSubscription(@NonNull Context context, @NonNull BluetoothDevice device,
                                                                @NonNull UUID serviceUUID, @NonNull UUID characteristicsUUID); static ConnectionMonitor createConnectionMonitor(@NonNull Context context, @NonNull BluetoothDevice device); static OperationBuilder createOperationBuilder(@NonNull Context context); static UUID createUUID(int uuid); static Connection getConnection(@NonNull Context context, @NonNull BluetoothDevice device); static boolean isMacValid(@NonNull String mac); static BluetoothDevice getDevice(@NonNull String mac); static ScanBuilder createScannerBuilder(); }
Neatle { public static UUID createUUID(int uuid) { final String base = "-0000-1000-8000-00805F9B34FB"; return UUID.fromString(String.format("%08X", uuid & 0xFFFF) + base); } private  Neatle(); static CharacteristicSubscription createSubscription(@NonNull Context context, @NonNull BluetoothDevice device,
                                                                @NonNull UUID serviceUUID, @NonNull UUID characteristicsUUID); static ConnectionMonitor createConnectionMonitor(@NonNull Context context, @NonNull BluetoothDevice device); static OperationBuilder createOperationBuilder(@NonNull Context context); static UUID createUUID(int uuid); static Connection getConnection(@NonNull Context context, @NonNull BluetoothDevice device); static boolean isMacValid(@NonNull String mac); static BluetoothDevice getDevice(@NonNull String mac); static ScanBuilder createScannerBuilder();  }