How can Toasts be made to appear only if the app is in the foreground?
<p>I have a <code>Toast</code> that is called from inside a <code>Service</code>. 
It always appears regardless of the state of the app, as designed.</p>

<p>How can make it appear only when my app is in the foreground, and not when other apps are in front? That is, without moving it to <code>Activity</code> code.</p>
