title: Alarm Receiver and Android Manifest
body: <p>I've found several tutorials about setting the alarm receiver to send a toast message in set intervals. and i've been following the code and broken down my own project into 3 classes. </p>
  
  <p>the HelloDroidActivity.java is:</p>
  
  <pre><code>package com.example.helloandroid;
  
  import java.util.Calendar;
  
  import android.app.Activity;
  import android.app.AlarmManager;
  import android.app.PendingIntent;
  import android.content.Context;
  import android.content.Intent;
  import android.os.Bundle;
  import android.util.Log;
  import android.widget.TextView;
  import android.widget.Toast;
  
  import com.example.helloandroid.alarms.MyAlarmReciever;
  
  public class HelloDroidActivity extends Activity {
  /** Called when the activity is first created. */
  
  public static int RTC_WAKEUP;
  public static long INTERVAL_FIFTEEN_MINUTES;
  
  private AlarmManager alarmMgr;
  
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      TextView tv = new TextView(this);
      tv.setText("Hello, Krishneel");
      setContentView(tv);
      Toast.makeText(this, "Alarm went off", Toast.LENGTH_SHORT).show();
  
      Log.d("OnCreate", "abcdabcdabcdabcdabcdabcdabcdabcdabcdabcd");
      alarmMgr = (AlarmManager) getSystemService(Context.ALARM_SERVICE);
      Intent intent = new Intent(this, MyAlarmReciever.class);
      PendingIntent pendingIntent = PendingIntent.getBroadcast(this, 0,
              intent, PendingIntent.FLAG_UPDATE_CURRENT);
      Calendar calendar = Calendar.getInstance();
      calendar.setTimeInMillis(System.currentTimeMillis());
      calendar.add(Calendar.SECOND, 5);
      alarmMgr.setRepeating(AlarmManager.RTC_WAKEUP,
              calendar.getTimeInMillis(), 7000, pendingIntent);
  
  }
  }
  </code></pre>
  
  <p>also the MyAlarmReciever.java(i am already aware of the spelling mistake on the name):</p>
  
  <pre><code>package com.example.helloandroid.alarms;
  
  import android.content.BroadcastReceiver;
  import android.content.Context;
  import android.content.Intent;
  import android.util.Log;
  import android.widget.Toast;
  
  public class MyAlarmReciever extends BroadcastReceiver {
  
      @Override
      public void onReceive(Context context, Intent intent) {
          // TODO Auto-generated method stub
  
          Log.e("onReceive", "ladskjflsakjdflskjdflskjdfslkjdflasdf");
          Toast.makeText(context, "OnReceive alarm test", Toast.LENGTH_SHORT).show();
      }
  }
  </code></pre>
  
  <p>and the Android Manifest which looks like this : </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.example.helloandroid"
      android:versionCode="1"
      android:versionName="1.0" &gt;
  
      &lt;uses-sdk android:minSdkVersion="7" /&gt;
  
      &lt;application
          android:icon="@drawable/ic_launcher"
          android:label="@string/app_name" &gt;
          &lt;activity
              android:name="com.example.helloandroid.HelloDroidActivity"
              android:label="@string/app_name" &gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.MAIN" /&gt;
  
                  &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
  
          &lt;receiver android:name="AlarmReceiver"&gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="com.example.helloandroid.alarms" /&gt;
              &lt;/intent-filter&gt;
          &lt;/receiver&gt;
      &lt;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>
  
  <p>I have read that in order to get the project to receive my alarmReceiver java class I need to edit the manifest with a new receiver. but I'm fairly new to XML and dont know which direction to take. </p>