Java [android] Activity, extern classes
<p>Java newbie is here.</p>

<pre><code>AlertDialog.Builder builder = new AlertDialog.Builder(this);
AlertDialog dlg = builder.setMessage(messageText).create();
dlg.setOwnerActivity(this);
dlg.show();
</code></pre>

<p>^ this code works well in the main class, but when I try to make an extern one like this:</p>

<pre><code>Messages myMessages = new Messages();
myMessages.SendAlert("Oh shi--!");
</code></pre>

<p>+</p>

<pre><code>public class Messages extends Activity {
    public void SendAlert(String messageText) {
        AlertDialog.Builder builder = new AlertDialog.Builder(this);
        AlertDialog dlg = builder.setMessage(messageText).create();
        dlg.setOwnerActivity(this);
        dlg.show();
    }
}
</code></pre>

<p>^ it's not working at all.</p>

<p>What I can do with it? :-\</p>
