0

I am building an Android app that uses Bluetooth. For a couple of weeks now I've been trying to create service that could provide Bluetooth connection to a socket at all times, but nothing worked for me. The goal: Bluetooth service that is connected even if the app is closed. I've tried: - Bound service - Singleton service - Shared class

Is there something else I can try?

  • Please remove all references to Android Studio. It has nothing to do with your problem. – blackapps Feb 21 '20 at 06:54
  • Please do check Foreground Services and keep in mind that newer Android versions are making more strictness on how much they allow such services to run – Sherif elKhatib Feb 21 '20 at 06:57

1 Answers1

0

You cannot run service all the time unless you use foreground notification, check here, if it is visible then your service is running even the app is killed

Prakash Reddy
  • 944
  • 10
  • 20