StandOut icon indicating copy to clipboard operation
StandOut copied to clipboard

get close call in "MyWindow" class

Open vrdvaibhav opened this issue 10 years ago • 2 comments

when we call MyWindow.closeAll() function view of windows get closed, but is there any method in MyWindow which will be called when we call closeAll(). I observed that after calling closeAll() service is still running, so I want to stop some timers, unregister receivers, etc when we close the window using closeAll().

vrdvaibhav avatar Jul 10 '14 08:07 vrdvaibhav

This is actually quite critical, in the case of log out and log back in, for example, it does not completely kill the service causing old data to show up instead of starting it from fresh.

cargo8 avatar Oct 02 '15 21:10 cargo8

@vrdvaibhav try doing this with your own ID in onClose()

    stopService(getShowIntent(this, getClass(), MY_ID));

cargo8 avatar Oct 02 '15 22:10 cargo8