In my task, I have perform the Reminder Checking process. If the reminder time comes to equal the Current time it will raise a pop-up box. In this Task the pop-up box Comes correctly.
But if i Merge this task to a Some big process, Which means the Reminder task will be a Sub-program of the main program. The Pop-up not coming in the other Screens. If the Time Met the Current time, the alert must shown to the User, while the user using any of the Screen in this Program..
if (LDbTime <= LSysTime) {
rem_id = c.getString(c.getColumnIndex("reminder_id"));
remName = c.getString(c.getColumnIndex("rname"));
mediaPlayer.start();
handler.post(new Runnable(){
public void run() {
alert.setTitle("Alert :"+remName);
alert.setPositiveButton("OK", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton) {
mediaPlayer.pause();
}
});
alert.show();
db1.execSQL("UPDATE RemainAlarmS SET expired ='TRUE' WHERE reminder_id = " + rem_id );
}
});
Thread.sleep(5000);
}
In this Alert message needs to Bring for Front Screen at the time of Reminder wake-up.
Please Help me to find the Solution..
Thanks in Advance.