detecting changes to my program's focus
<p>When other programs are open in Android, how do I know when my program loses focus or gains focus?</p>

<p>I've seen the <a href="http://developer.android.com/reference/android/view/View.html#onFocusChanged%28boolean,%20int,%20android.graphics.Rect%29" rel="nofollow">View <code>onFocusChanged</code> event</a>, but I think that's unrelated (when i use a view changer).</p>

<p>How can this be done?</p>
