Android Handle IntentService onStop event -
i want handle intentservice onstop event. intentservice receive intents, launch worker thread, , stop service appropriate have not found onstop method. has ondestroy() ondestroy() method can not called.
ondestroy called when system low on resources(memory, cpu time , on) , makes decision kill activity/application or when calls finish() on activity.
can add code in onstop intentservice time ?
you can use stopself() stop service. perform task before service stops can write custom callback/ broadcast after thread notify ui.
Comments
Post a Comment