I want to schedulers background service to run a scan method. so the service will update the number of scanned file. how can i handle the case that i closed the app schedulers run the service, the update ui method will crash and stop running the service.
According to my case
I changed the structure to let the service to send a broadcast and receive it in the activity.
See this link. Its a very good example of Service. It illustrates both way communication.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With