0

I am creating an app which require a service. This service create a thread and called selfStop immediately.

How does stopping the service affect the life cycle of created thread?

Is there anyway to stop the service from the thread, if the service is running?

Can a service be stopped after some delay, if it is running?

Thanks!

mia
  • 1,148
  • 1
  • 11
  • 17

1 Answers1

0

When you create a new thread which processes something in the background, it will be destroyed automatically after this process ends up.

It does not make sense to create a thread and try to stop the main thread from it.