Android way to check my activity's windowstate - background
<p>I have a chat app, when my app is in the background (called HOME button), my app is running countiniously...</p>

<p>When on my app a user initiate a private chat with me, i d like to showing up a notification. </p>

<p>So <strong>how I can check in my app, that my app is in the background</strong>? </p>

<p>Leslie</p>
