Why Alarm Is Not Set For Specific date in android?
<p>I am making a application of Birth day reminder,But when I am setting alarm using alarm manager which is not working  my code is :-</p>

<pre><code>    int mYear = 2012;
    int mMonth = 7;
    int mDay = 8;
    int mHour = 11;
    int mMinutes = 48;

    Calendar calendar = Calendar.getInstance();
    calendar.setTimeInMillis(System.currentTimeMillis());
    calendar.clear();

    //calendar.add(Calendar.SECOND, 10);

    calendar.set(Calendar.YEAR, mYear);
    calendar.set(Calendar.MONTH,mMonth);
    calendar.set(Calendar.DAY_OF_MONTH,mDay);
    calendar.set(Calendar.HOUR_OF_DAY,mHour);
    calendar.set(Calendar.MINUTE,mMinutes);

  //cal.set will set the alarm to trigger exactly at: 21:43, 5 May 2011
  //if you want to trigger the alarm after let's say 5 minutes after is activated you need to put
  //cal.add(Calendar.MINUTE, 5);

  Intent myIntent = new Intent(getApplicationContext(),AlarmReceiver.class);
   myIntent.putExtra("message","Happy B'Day...");

     //HELLO_ID is a static variable that must be initialised at the BEGINNING OF CLASS with 1;

    //example:protected static int HELLO_ID =1;

    PendingIntent  pendingIntent = PendingIntent.getBroadcast(getApplicationContext(),HELLO_ID, 
                          myIntent,PendingIntent.FLAG_UPDATE_CURRENT|  Intent.FILL_IN_DATA);        



        //VERY IMPORTANT TO SET FLAG_UPDATE_CURRENT... this will send correct extra's informations to 
     //AlarmReceiver Class
// Get the AlarmManager service 
   AlarmManager alarmManager = (AlarmManager)getSystemService(ALARM_SERVICE);
  alarmManager.set(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), pendingIntent); 
    Toast.makeText(getApplicationContext(), "Start Alarm", Toast.LENGTH_LONG).show();
</code></pre>

<p>My broadcastreciever class is as :-</p>

<pre><code>             // NotificationManager mNotificationManager = 

           try {
          // Bundle bundle = intent.getExtras();
             // String message = bundle.getString("message");
            System.out.println("ggggggggggggggggggggg");
           //Intent newIntent = new Intent(context, AlarmActivity.class);
           //newIntent.putExtra("alarm_message", message);
           // newIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
          // context.startActivity(newIntent);
          PendingIntent contentIntent = PendingIntent.getActivity(context, 
                 NOTIFICATION_ID, 
                 new Intent(context, AlarmReceiver.class), 0);
                        Bundle extras=intent.getExtras();
                        String title=extras.getString("message");

         Toast.makeText(context, title, Toast.LENGTH_SHORT).show();
        } catch (Exception e) {
         Toast.makeText(context, "There was an error somewhere, but we still      received an alarm", Toast.LENGTH_SHORT).show();
         e.printStackTrace();

        }
</code></pre>

<p>but it is not working when i set date on my emulator no any work is perform please anyone guide me how i achieve this.. </p>
