Start discovery activity automatically when no devices available (#33)
parent
0629d6aa5d
commit
0c039b8a46
|
@ -110,7 +110,13 @@ public class ControlCenter extends Activity {
|
||||||
startIntent.setAction(BluetoothCommunicationService.ACTION_START);
|
startIntent.setAction(BluetoothCommunicationService.ACTION_START);
|
||||||
startService(startIntent);
|
startService(startIntent);
|
||||||
|
|
||||||
requestDeviceInfo();
|
|
||||||
|
if (deviceList.isEmpty()) {
|
||||||
|
// start discovery when no devices are present
|
||||||
|
startActivity(new Intent(this, DiscoveryActivity.class));
|
||||||
|
} else {
|
||||||
|
requestDeviceInfo();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue