I have some Service with onCreate method. In this onCreate method I have some processes and I need to still run this processes repeated all the time from start. I can’t use infinite loop, because then my Service force close, I think it is not possible to use infinite loop in onCreate method.
Share
Just start a
Threadin youronCreatemethod, and do all the processing inside thatThread. Make sure to stop thatThreadwhen you no longer need it (maybe when theServiceis stopped) .