Preventing App from Being Put to Sleep in Wear OS 4/5

Since Wear OS 4, a feature was introduced to put apps into sleep mode while they run in the background. There’s a list in Settings → Battery → Sleeping apps, with the apps that will be put to sleep and only occasionally run in the background.

My app is responsible for critical Bluetooth Low Energy (BLE) communication and runs in the background via a ForegroundService. Consequently, I need it to run constantly and not be put to sleep, which currently requires users to manually remove my app from the “Sleeping apps” list. Otherwise, my app just doesn’t work properly.

  1. Is there a way to programmatically ensure that my app is not placed into the sleeping apps list by default?
  2. Alternatively, can my app detect whether it is listed in the “Sleeping apps”, or when it’s being put to sleep, so that I can notify users to remove it manually if necessary?

Any guidance or suggestions would be highly appreciated.

Hello,
You can check with Developer Support directly for 1-on-1 suggestion as the issue seems related to Samsung restricted feature.

Thanks

1 Like