Gadgetbridge: Notifications after turning off Bluetooth causes toast spam

Created on 11 May 2018  路  7Comments  路  Source: Freeyourgadget/Gadgetbridge

Before opening an issue please confirm the following:

  • [鉁旓笍] I have read the wiki, and I didn't find a solution to my problem / an answer to my question.
  • [鉁旓笍] I have searched the issues, and I didn't find a solution to my problem / an answer to my question.
  • [鉁旓笍] If you upload an image or other content, please make sure you have read and understood the github policies and terms of services

Your issue is:

I'm still in the process of figuring out a reproducable way to cause this, but I believe the problem is:

  • Be connected to watch

  • Disable Bluetooth on phone

  • Recieve a notification

The result is spammed "Bluetooth is disabled" toasts, this is with reconnect turned off but it seems to pop up roughly 12 times(default reconnection amount tries).
I initially thought this was an issue with YouTube because that's where I first noticed it, I would switch apps and YouTube would go in to the background, but I realized it was probably media trying to update, at this point I had closed gadget bridge completely and reopened it and was unable to reproduce the problem. I've since also had it happen just from normal notifications, such as from telegram, coming in, with the screen on even.
The context of me getting this is I have Tasker set to turn on Bluetooth when I disconnect from my home wifi and turn it off when I reconnect, which is when Bluetooth gets turned off to cause this, this has been fixed every time by closing out gadget bridge and reopening it.

Your wearable device is:

Pebble time with firmware 4.3

Your android version

Android 8.0/miui 9

Your Gadgetbridge version is:

0.26.3

New issues about already solved/documented topics could be closed without further comments. Same for too generic or incomplete reports.

Most helpful comment

This is probably the automatic connection stuff, it tries to connect, sees, that bluetooth is off and then the toast appears. We should not even try to connect when bluetooth is off.

All 7 comments

I'm using Tasker as well, in the same way. I can confirm having seen those "Bluetooth is disabled" toasts when Tasker switched off BT. But I don't remember that being connected with notifications nor "being spammed" in the described way.

Does that happen on a single notification? Just in a short interval after BT being disabled, or for the full time BT is disabled?

I don't feel annoyed by it, but I could keep an open eye for comparison. Android 6 (LOS) here on an old LG P880. Yes, still :wink:

It happens the full time after Bluetooth has been disabled until I close and reopen GB. As far as I can tell it's every notification, I still need to test a bit more.
I think I've found the consistent way to cause this for me though which is just to be connected to the watch in any case, then turn off Bluetooth on my phone, this causes the "Bluetooth disabled" message to appear twice after the point of turning Bluetooth off.
From this point, opening YouTube and then switching home to cause it to go in the background with a notification caused the toast to repeatedly show up 14 times from what I counted, after which closing YouTube caused it to come up twice more. Playing a song on Spotify which causes a notification caused 10 toasts(by my count) to appear, after which closing Spotify which made the notification go away caused no additional toasts. Opening a YouTube video or Spotify again and putting it in this background seems to only cause anywhere from 4 to 5 toasts to appear, closing still causes 2.
I tried generating a notification with a couple notification apps and couldn't get anything to happen, so I think this is only related to media notifications.
My biggest issue with this aside from annoyance is the toasts potentially being indicitive of an underlying problem of silently spamming trying to connect.

As far as I can tell it's every notification, I still need to test a bit more.

AFAIR at my end there was not even a notification. I'v always thought it is just the feedback from Tasker operations (switching to airplane, for example). But I must admit I don't get that many notifications, so I'm not always watching my phone to see when it happens :wink:

This is probably the automatic connection stuff, it tries to connect, sees, that bluetooth is off and then the toast appears. We should not even try to connect when bluetooth is off.

This is probably the automatic connection stuff

Just for the record I have automatic reconnect turned off, I only have start automatically and connect to device when Bluetooth turned on enabled.

@raku-cat
Just for the record, you are right, and it is a bug.
:+1:

I'm on 0.32.1, PixelExperience 9. Encountering this as well.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

UncleInf picture UncleInf  路  3Comments

Jiack214 picture Jiack214  路  6Comments

cpfeiffer picture cpfeiffer  路  4Comments

yarons picture yarons  路  7Comments

ihsan-driveyello picture ihsan-driveyello  路  6Comments