title: Alarm Repeating automatically
body: <p>I ring alarm at particular user entered time. The problem is that after some time, the alarm rings again even if no time is set. This repeated alarm does not ring after after a fixed time. Sometimes it rings after 2 minutes, sometimes after 7 minutes and so on..I don't want this, It is ruining my project. Below is my code, can you help me:</p>
  
  <pre><code>   Intent myIntent = new Intent(ReminderService.this, MyReceiver.class);
              int randomPIN = (int)(Math.random()*9000)+1000;
              pendingIntent = PendingIntent.getBroadcast(ReminderService.this, randomPIN, myIntent,pendingIntent.FLAG_ONE_SHOT);
              AlarmManager alarmManager = (AlarmManager)getSystemService(ALARM_SERVICE);
              alarmManager.set(AlarmManager.RTC, System.currentTimeMillis() , pendingIntent);
  </code></pre>
  
  <p>MyReceiver.java:</p>
  
  <pre><code>  package app.aguai.medieazy;
  
  import android.content.BroadcastReceiver;
  import android.content.Context;
  import android.content.Intent;
  
  public class MyReceiver extends BroadcastReceiver
  {
  
  @Override
   public void onReceive(Context context, Intent intent)
  {
     Intent service1 = new Intent(context, MyAlarmService.class);
     context.startService(service1);
  
   }
  
  }
  </code></pre>
  
  <p>And My AlarmService.java:</p>
  
  <pre><code>public class MyAlarmService extends Service 
  
  {
   private NotificationManager mManager;
  
   @Override
   public IBinder onBind(Intent arg0)
   {
     // TODO Auto-generated method stub
      return null;
   }
  
  @Override
  public void onCreate() 
  {
     // TODO Auto-generated method stub  
     super.onCreate();
  }
  
  @SuppressWarnings("static-access")
  @Override
  public void onStart(Intent intent, int startId)
  {
     super.onStart(intent, startId);
  
     Calendar c = Calendar.getInstance(); 
      int hour = c.get(Calendar.HOUR_OF_DAY);
      int min=c.get(Calendar.MINUTE);
      int sec=c.get(Calendar.SECOND);
      String currenttime= String.valueOf(hour)+" : "+String.valueOf(min)+" : "+String.valueOf(sec);
  
     PrescribedDB db=new PrescribedDB(getApplicationContext());
     Intent i=new Intent(MyAlarmService.this,ReminderPopUp.class);
     i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
  
     i.putExtra("name",db.getMed(currenttime));
     i.putExtra("time",currenttime);
     startActivity(i);
  }
  
  @Override
  public void onDestroy() 
  {
      // TODO Auto-generated method stub
      super.onDestroy();
  }
  
  }
  </code></pre>
  
  <p>I have to launch this project tomorrow and this is the only small bug in my big project. Please help. Thanx.</p>