Note that there are some explanatory texts on larger screens.

plurals
  1. PONot able to Set Multiple Reminders
    primarykey
    data
    text
    <p>There is functionality in my app where a user can set multiple reminders. But the problem is that when user set time for reminder A and than for Reminder B, then reminder B only gets call. That is the intent for reminder A never gets call. In short Only one reminder is working all the time. Here is snippet of setting reminder and calling Broadcast.</p> <pre><code>public void setAlarm(int dayValue, int monthValue, int yearValue, int hourValue, int minValue, String message, int pos){ int ID = 1; calendar.set(yearValue, monthValue, dayValue, hourValue, minValue, 0); Calendar tempCal = Calendar.getInstance(); Intent intent = new Intent(context,ReminderNissan.class); intent.putExtra("title",message); intent.putExtra("note",message); intent.putExtra("id", pos); Log.d("****Indide set alarm method*****", "PSOITION " + pos); if((tempCal.compareTo(calendar)== -1) || (tempCal.compareTo(calendar)== 0)){ try{ db.open(); db.setAlarm(id.get(pos).toString(), 1); db.close(); }catch(SQLException exp){ Log.d("SET ALARM OFF SQL EXCEPTION", exp.toString()); } PendingIntent sender = PendingIntent.getBroadcast(context, ID,intent,0); am.set(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), sender); //Toast.makeText(context, "*** ALARM SET AT *** " + pos, Toast.LENGTH_SHORT).show(); }else{ try{ db.open(); db.setAlarm(id.get(pos).toString(), 0); db.close(); }catch(SQLException exp){ Log.d("SET ALARM OFF SQL EXCEPTION", exp.toString()); } Toast.makeText(context, "Time Has Alredy Passed. Set proper Time. ", Toast.LENGTH_SHORT).show(); } } </code></pre>
    singulars
    1. This table or related slice is empty.
    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.
    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