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?

4

1 回答 1

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

于 2020-02-21T07:31:23.727 回答