Android: how to show a toast before forcing the closure of the app?
<p>i've to show a toast and after to force the closure of the app if there isn't an internet connection, but if i show only the toast everything is ok:</p>

<pre><code>Toast.makeText(getApplicationContext(), "Nessuna connessione", Toast.LENGTH_LONG).show();
</code></pre>

<p>if i make this:</p>

<pre><code>Toast.makeText(getApplicationContext(), "Nessuna connessione", Toast.LENGTH_LONG).show();
android.os.Process.killProcess(android.os.Process.myPid());
</code></pre>

<p>the app is closed and the toast isn't show.</p>

<p>how i can show this toast and after close the app?</p>
