Note that there are some explanatory texts on larger screens.

plurals
  1. POAlarm Broadcasting class is not repeating the alarm again
    primarykey
    data
    text
    <p>Please guide me so that the alarm (mail sending) will compile again and provide me mail before 1 day of event occurring and then before 30 minutes of event occurring.</p> <p>Thanks in Advance.</p> <pre><code>public class MailAlarm extends BroadcastReceiver{ NotificationManager nm; public void onReceive(Context context, Intent intent) { nm = (NotificationManager) context .getSystemService(Context.NOTIFICATION_SERVICE); //int iUniqueId = (int) (System.currentTimeMillis() &amp; 0xfffffff); String event = Mail_Fill_Details.Discripton; String name = Mail_Fill_Details.Person_Name; String mail =Mail_Fill_Details.mailString; try { GMailSender sender = new GMailSender("taskschedulerfable@gmail.com", "xyz"); sender.sendMail("Reminder of "+event+" ("+name+")" , "REMINDER!! REMINDER!! REMINDER!! \n\n\nYou got a reminder about "+event+"("+name+") after 5 minutes\n\n\n", "taskschedulerfable@gmail.com", mail); } catch (Exception e) { Log.e("SendMail", e.getMessage(), e); } </code></pre> <p>Rest code is here...</p> <pre><code>Intent intent = new Intent(Mail_Fill_Details.this, MailAlarm.class); Bundle b12 = new Bundle(); b12.putString("serverresponse", Discripton); b12.putString("serverresponse1", Person_Name); b12.putString("serverresponce2", mailString); intent.setAction("" + Math.random()); intent.putExtras(b12); PendingIntent displayIntent = PendingIntent .getBroadcast(Mail_Fill_Details.this, iUniqueId, intent, PendingIntent.FLAG_UPDATE_CURRENT); alarmManager.set(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis() - 300000, displayIntent); // alarmManager.setRepeating(AlarmManager.RTC_WAKEUP, // calendar.getTimeInMillis(), 20, displayIntent); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload