Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialdurgeshchalavadi rt
232 PointsCalling and Executing the service
we are starting service as many as the songs are in the list, so we are calling onStartCommand() function each time but if we are close the app why loop doesn't break? and after closing why all songs are start downloading again after once they have downloaded since we are calling the onStartCommand only the length of songs list
1 Answer
Darel Bitsy
6,910 PointsCan you please post the code or function ?
i think it's because service run in background even after app is closed , try to force close and see if the loop still run