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

Hide Standout window when click on HOME button. #36

Open pankaj2020 opened 8 years ago

pankaj2020 commented 8 years ago

How to hide window on HOME button click or app goes in background? As I want to use standout window in app only. When app goes in background/destroy, window should hide.

Kindly suggest solution.

lekeCoder commented 7 years ago

Hello,

Try this to either close or hide window when activity goes into backgound/destroy In onDestroy() startService(StandOutWindow.getHideIntent(this,_WINDOW_TO_HIDE.class,WINDOW_ID); //to hide

     startService(StandOutWindow.getCloseIntent(this,_WINDOW_TO_HIDE.class,WINDOW_ID); //to close

Ensure the WINDOW_ID is the same ID you used to start the StandOutWindow window.

Hope this help.