java - Background Service thread -


i have started background service. aware started on main thread , have create new thread/runnable within background class.

i seem spending lot of time managing how prevent thread , background service continuing, leading me believe may better off using intent service , run @ specified timer interval main activity. background service performing network operation once every 10 seconds , sleeping. uses broadcast intent send info listening activities.

my question is: when kill background service (either stopself(); or if use bound service 'unbind' command, kill created thread without me explicitly calling thread.interrupt? efficient way of utilising background service given added need threading?


Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -