Display AlertDialog as system overlay window from Service
<p>I have issue with displaying AlertDialog from Service. I am able to display custom layout window using Toast or using WindowManager(TYPE_SYSTEM_ALERT or TYPE_SYSTEM_OVERLAY). But, I do not want to use custom layout, I prefer to use nice AlertDialog GUI directly.</p>

<p>Scenario:</p>

<ul>
<li>Running Service. No active Activity present.</li>
<li>On some external event, Service sends Notification</li>
<li>When user press Notification, Service is informed via PendingIntent and AlertDialog should be displayed (created with <code>AlertDialog.Builder(this)</code>)</li>
</ul>

<p>Error:</p>

<pre><code>ERROR/AndroidRuntime(1063): Caused by: android.view.WindowManager$BadTokenException: Unable to add window -- token null is not for an application
</code></pre>

<p>Searching for the answer lead me to impression that I am trying something that is currently not possible (Android 2.2). Or maybe it is.</p>
