List of usage examples for com.facebook.react.bridge WritableNativeMap putInt
@Override
public native void putInt(@NonNull String key, int value);
From source file:io.github.douglasjunior.ReactNativeEasyBluetooth.core.CoreModule.java
License:Open Source License
private WritableNativeMap wrapDevice(BluetoothDevice bluetoothDevice, int RSSI) { WritableNativeMap device = new WritableNativeMap(); device.putString("address", bluetoothDevice.getAddress()); device.putString("name", bluetoothDevice.getName()); device.putInt("rssi", RSSI); WritableArray uuids = new WritableNativeArray(); if (bluetoothDevice.getUuids() != null) { for (ParcelUuid uuid : bluetoothDevice.getUuids()) { uuids.pushString(uuid.toString()); }//from w w w . jav a 2 s . co m } device.putArray("uuids", uuids); return device; }