Hii,

I am using following code for setting alarm at specified time but I'm not
able to receive alarm at specified time. Please tell me where is the problem




Calendar cal = Calendar.getInstance();

          cal.setTimeInMillis(System.currentTimeMillis());
          cal.clear();
          cal.set(Calendar.YEAR, mYear);
          cal.set(Calendar.MONTH, mMonth);
          cal.set(Calendar.DAY_OF_MONTH, mDay);
          cal.set(Calendar.HOUR, mHour);
          cal.set(Calendar.MINUTE,mMinutes);

      Intent activate = new Intent(this, TimeAlarm.class);
      PendingIntent alarmIntent = PendingIntent.getBroadcast(this, 0,
activate, 0);
       alarms = (AlarmManager)getSystemService(Context.ALARM_SERVICE);
      alarms.set(AlarmManager.RTC_WAKEUP, cal.getTimeInMillis(),
alarmIntent);

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to