pingpongboss / StandOut

StandOut lets you easily create floating windows in your Android app.
http://pingpongboss.github.com/StandOut
MIT License
1.24k stars 379 forks source link

get close call in "MyWindow" class #21

Open vrdvaibhav opened 10 years ago

vrdvaibhav commented 10 years ago

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().

cargo8 commented 9 years ago

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 commented 9 years ago

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

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