Android keeps turning off my background service

  • Replies:2
Vojastt
  • Forum posts: 1

Feb 23, 2022, 9:35:49 PM via Website

Im currently working on an app that needs to listen bluetooth devices in background. I implemented bluetooth broadcast receiver that listens bluetooth devices in background but even after turning off battery restrictions for my app, android still keeps deinitializing broadcast receiver and it stops working after some time. I use xiaomi redmi note 7 for testing. Does anyone have any suggestion or solution how to improve my simple broadcast receiver solution and how to prevent android from deinitalizing broadcast receiver.
Thank you.

Reply
James Watson
  • Forum posts: 1,584

Feb 24, 2022, 8:52:43 AM via Website

Do you mean that your background service will still be turned off by Android after some time even if your app is already on the whitelist in Settings - Battery - Battery Optimization?

Download size < 0.15 MB. But also accurate enough, ad-free & free.
The minimalist app available on Play Store: https://goo.gl/ws42fN
Blog: https://okblackcafe.blogspot.com Your 5-star is appreciated.

Helpful?
Reply
Jimmy Wick
  • Forum posts: 24

Jul 25, 2022, 10:27:40 AM via Website

Well, this is interesting.

— modified on Jul 25, 2022, 10:29:27 AM

Helpful?
Reply