Display a toast when bonded
This commit is contained in:
parent
b056e1b2a0
commit
579546c9f8
|
@ -69,7 +69,7 @@ public class DiscoveryActivity extends Activity implements AdapterView.OnItemCli
|
||||||
if (device != null && device.getAddress().equals(bondingAddress)) {
|
if (device != null && device.getAddress().equals(bondingAddress)) {
|
||||||
int bondState = intent.getIntExtra(BluetoothDevice.EXTRA_BOND_STATE, BluetoothDevice.BOND_NONE);
|
int bondState = intent.getIntExtra(BluetoothDevice.EXTRA_BOND_STATE, BluetoothDevice.BOND_NONE);
|
||||||
if (bondState == BluetoothDevice.BOND_BONDED) {
|
if (bondState == BluetoothDevice.BOND_BONDED) {
|
||||||
LOG.info("Successfully bonded with: " + bondingAddress);
|
GB.toast(DiscoveryActivity.this, "Successfully bonded with: " + bondingAddress, Toast.LENGTH_SHORT, GB.INFO);
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue