mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2025-02-03 21:47:32 +01:00
Start discovery activity automatically when no devices available (#33)
This commit is contained in:
parent
0629d6aa5d
commit
0c039b8a46
@ -110,8 +110,14 @@ public class ControlCenter extends Activity {
|
|||||||
startIntent.setAction(BluetoothCommunicationService.ACTION_START);
|
startIntent.setAction(BluetoothCommunicationService.ACTION_START);
|
||||||
startService(startIntent);
|
startService(startIntent);
|
||||||
|
|
||||||
|
|
||||||
|
if (deviceList.isEmpty()) {
|
||||||
|
// start discovery when no devices are present
|
||||||
|
startActivity(new Intent(this, DiscoveryActivity.class));
|
||||||
|
} else {
|
||||||
requestDeviceInfo();
|
requestDeviceInfo();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Requests information from the {@link BluetoothCommunicationService} about the connection state,
|
* Requests information from the {@link BluetoothCommunicationService} about the connection state,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user