Get current state of the foreground service
Nohac opened this issue · 1 comments
Nohac commented
It would be nice to have a function or a callback/event to get the status of the foreground service.
I currently need a way to find out if the service is running or not, as I'm providing users the ability to start and stop the service.
Without knowing the state, it's impossible to, for example, create a start/stop button that changes based on if the service is running or not.
I can track the state myself based on the button presses, but if the user somehow kills the service, exits and re-enters the screen or I loose track some other way, It's impossible for me to get the current state back.
geocfu commented
Thats very true!