How to display Message box in thread?
<p>all .. I'm new to android.  i try to make a calendar with remainder alarm.. Everything i coded and work fine.. but 'alarm event' work only in LogCat as system.out.print But it wont able to display in android Emulator GUI. I make this alarm function in wakeUp by using Thread.
In this thread i want to display a alert box to GUI. 
Here i attached the code. Can any one tell how to display a message while in thread?</p>

<p><strong>Coding:</strong></p>

<pre><code>public void run() {
        for (;;) {
            SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmm");
            Calendar cal = Calendar.getInstance();
            stime = dateFormat.format(cal.getTime());
            arrCRInt = Long.parseLong(stime);
            try {
                i = 0;
                c = db1.rawQuery("SELECT * FROM " + CRA, null);
                if (c != null) {
                    if (c.moveToFirst()) {
                        do {
                            dbdatetime = c.getString(c.getColumnIndex("rdatetime"));
                            arrDBInt = Long.parseLong(dbdatetime);
                            remName = c.getString(c.getColumnIndex("rname"));
                            rem_id = c.getString(c.getColumnIndex("reminder_id"));
                            alertId=c.getString(c.getColumnIndex("alert"));
                            if (arrDBInt &lt; arrCRInt) {
                                if(alertId.equals("TRUE"))
                                {
                                    ///////////////////// Passing Alert Message to Android Emulator GUI
                                    db1.execSQL("UPDATE "+CRA+" SET "+ALERT+"='FALSE' WHERE reminder_id = " + rem_id );
                                }
                                db1.execSQL("UPDATE "+CRA+" SET "+STATUS+"='TRUE' WHERE "+CRDATETIME+"&lt;"+arrCRInt +" and reminder_id = " + rem_id );
                            }
                            if (arrDBInt == arrCRInt) {
                                ///////////////////// Passing Alert Message to Android Emulator GUI
                                System.out.println("ALERTED AS: You Have " + remName + " Remainder as on this Time");
                                db1.execSQL("UPDATE "+CRA+" SET "+ALERT+"='FALSE' WHERE "+CRDATETIME+"="+arrCRInt +" and reminder_id = " + rem_id );
                            }
                            if(arrDBInt&gt;arrCRInt)
                            {
                                ///////////////////// Passing Alert Message to Android Emulator GUI
</code></pre>

<p><em><strong>/////////////////////Here alert Box, Message Box, Toast, etc everything doesn't work</em></strong></p>

<pre><code>                            }
                        } while (c.moveToNext());
                    }
                }
                Thread.sleep(10000);
            } catch (Exception e) {
            }
        }
    }
</code></pre>
