private final BluetoothGattCallback mGattCallback = new BluetoothGattCallback() {
@Override
public void onConnectionStateChange(BluetoothGatt gatt, int status,
int newState) {
// TODO Auto-generated method stub
String intentAction;
if(newState == BluetoothProfile.STATE_CONNECTED) {
intentAction = ACTION_GATT_CONNECTED;
mConnectionState = STATE_CONNECTED;
mBluetoothGatt.readRemoteRssi();
.
.
.
.
.
public void onCharacteristicChanged(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic) {
broadcastUpdate(ACTION_DATA_AVAILABLE, characteristic);
}
public void onReadRemoteRssi(BluetoothGatt gatt, int rssi, int status) {
final Intent rssiIntent = new Intent(BluetoothLeService.this, DeviceControl.class);
rssiIntent.putExtra(DeviceControl.RSSI, rssi);
}