mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-24 19:06:53 +01:00
display connection state in notification area
This commit is contained in:
parent
462f9f028f
commit
8e25c03350
@ -1,5 +1,9 @@
|
||||
package nodomain.freeyourgadget.gadgetbridge;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.GBDevice.State;
|
||||
import nodomain.freeyourgadget.gadgetbridge.miband.MiBandSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.pebble.PebbleIoThread;
|
||||
import nodomain.freeyourgadget.gadgetbridge.pebble.PebbleSupport;
|
||||
import android.app.NotificationManager;
|
||||
import android.app.Service;
|
||||
import android.bluetooth.BluetoothAdapter;
|
||||
@ -19,11 +23,6 @@ import android.support.v4.content.LocalBroadcastManager;
|
||||
import android.util.Log;
|
||||
import android.widget.Toast;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.GBDevice.State;
|
||||
import nodomain.freeyourgadget.gadgetbridge.miband.MiBandSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.pebble.PebbleIoThread;
|
||||
import nodomain.freeyourgadget.gadgetbridge.pebble.PebbleSupport;
|
||||
|
||||
public class BluetoothCommunicationService extends Service {
|
||||
public static final String ACTION_START
|
||||
= "nodomain.freeyourgadget.gadgetbride.bluetoothcommunicationservice.action.start";
|
||||
@ -68,6 +67,7 @@ public class BluetoothCommunicationService extends Service {
|
||||
if (mGBDevice.equals(device)) {
|
||||
mGBDevice = device;
|
||||
GB.setReceiversEnableState(mDeviceSupport.useAutoConnect() || mGBDevice.isConnected(), context);
|
||||
GB.updateNotification(mGBDevice.getName() + " " + mGBDevice.getStateString(), context);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user