Service, activity and notifications
<p>I have program that starts Service. </p>

<p>Service periodically checks server for updates. If there are new updates on server service creates notification. It creates notificatins even if my application is foreground. But I want it to create notification only if my application is background or stopped.</p>

<p>Can you advice me best way to implement it?</p>
