I implemented Service
and I need to call another thread from it ...
The fact is that I have a class that is used in several places and it starts a thread when it is executed, and now I need to make it so that this class runs in the background ...
I did what I did: I would implement the service and I want it to run my class in my background in which the thread is also implemented.
And I'm thinking, the service will start my class, my class will start its stream, the service does not know that the stream started there and will think that the work is finished and will die ...
Is it so?
And if so, how can you make him wait?