title: How to create alarm when calendar event is created?
body: <p>I have inserted an event in a calendar. The time of event created must also be created with alarm of the same time to ring. How to do it? I have used following code and it gives folowing error.</p>
  
  <p>I get following error when i use the following code:
  Main Activity:</p>
  
  <pre><code>    Calendar caln = Calendar.getInstance();
  
      caln.add(Calendar.SECOND, 2);
      Intent intent = new Intent(ToDoApplicationActivity.this, AlarmReceiver.class);
      intent.putExtra("alarm_message", title1);
  
      PendingIntent sender = PendingIntent.getBroadcast(this, 192837, intent, PendingIntent.FLAG_UPDATE_CURRENT);
  
      AlarmManager am = (AlarmManager) getSystemService(ALARM_SERVICE);
      am.set(AlarmManager.RTC_WAKEUP, cal.getTimeInMillis(), sender);
      startActivity(intent);
  </code></pre>
  
  <p>OnReceive method overrided:</p>
  
  <pre><code>public void onReceive(Context context, Intent intent) {
     try {
       Bundle bundle = intent.getExtras();
       String message = bundle.getString("alarm_message");
  
       Intent newIntent = new Intent(context, ToDoApplicationActivity.class);
       newIntent.putExtra("alarm_message", message);
       newIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
       context.startActivity(newIntent);
      } 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>ERROR got: </p>
  
  <blockquote>
    <p>android.content.ActivityNotFoundException: Unable to find explicit activity class {com.android.todoapplication/android.todoapplication.AlarmReceiver}; have you declared this activity in your AndroidManifest.xml?</p>
  </blockquote>
  
  <p>Any Help is highly appreciated and thanks in advance...</p>