title: Why is Android ignoring the creation of the Notification?
body: <p>I have code, and it just does not work, so I ask anyone to help me out. There is very little info on this specific matter.</p>
  
  <p><strong>MainActivity</strong></p>
  
  <hr>
  
  <pre><code>public class MainActivity extends Activity {
  public final int PENDING_INTENT_ID = 8;
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.main);
  
      Button clickity = (Button)findViewById(R.id.alarm_button);
      clickity.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              Calendar now = Calendar.getInstance();
              now.add(Calendar.SECOND, 20);
  
              //Create a new PendingIntent used by the Alarm when it activates
              Intent intent = new Intent(v.getContext(), AlarmReciever.class);
              intent.setAction("SOME_AWESOME_TRIGGER_WORD");
              intent.putExtra("info", "This String shows that the info is actually sent correctly");
              PendingIntent pendingIntent = PendingIntent.getBroadcast(v.getContext(), PENDING_INTENT_ID, intent, PendingIntent.FLAG_UPDATE_CURRENT|Intent.FILL_IN_DATA);
  
              //Then Create the alarm manager to send this pending intent and set the date to go off
              AlarmManager am = (AlarmManager)getSystemService(Activity.ALARM_SERVICE);
              am.set(AlarmManager.RTC_WAKEUP, now.getTimeInMillis(), pendingIntent);
  
          }
      });
  
  }
  </code></pre>
  
  <hr>
  
  <p><strong>AlarmReciever</strong> (Aware I spelled it wrong but since thats how it is, im going with it)</p>
  
  <hr>
  
  <pre><code>public class AlarmReciever extends BroadcastReceiver{
  
  @Override
  public void onReceive(Context c, Intent arg1) {
  
      //get a reference to NotificationManager
      String ns = Context.NOTIFICATION_SERVICE;
      NotificationManager mNotificationManager = (NotificationManager) c.getSystemService(ns);
  
      //Instantiate the notification
  
      CharSequence tickerText = "Hello";
      long when = System.currentTimeMillis();
      Notification.Builder builder = new Notification.Builder(c)
                                  .setTicker(tickerText)
                                  .setWhen(when)
                                  .setContentTitle(arg1.getStringExtra("info"))
                                  .setContentText("Success!!")
                                  .setAutoCancel(true);
      Notification notification = builder.getNotification();
      mNotificationManager.notify(0, notification);//note the first argument, the ID should be unique
  
  
  
  }
  }
  </code></pre>
  
  <hr>
  
  <p><strong>Manifest</strong></p>
  
  <hr>
  
  <p></p>
  
  <pre><code>&lt;uses-sdk
      android:minSdkVersion="14"
      android:targetSdkVersion="15" /&gt;
  
  &lt;application
      android:icon="@drawable/ic_launcher"
      android:label="@string/app_name"
      android:theme="@style/AppTheme" &gt;
      &lt;activity
          android:name=".MainActivity"
          android:label="@string/title_activity_main" &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="com.testproject.AlarmReciever"
          android:enabled="true"
          android:exported="false" &gt;
          &lt;intent-filter&gt;
      &lt;/receiver&gt;
  
  &lt;/application&gt;
  </code></pre>
  
  <p></p>
  
  <hr>
  
  <p>That should be everything. I am trying to run it as is and its not showing me anything. I am running it on an emulator is that actually matters.</p>
  
  <p>EDIT: When I say it doesn't work, I mean nothing pops up. It runs fine, but the Notification never pops up.</p>
  
  <p>The issue:
  <img src="https://i.stack.imgur.com/hEDkN.png" alt="enter image description here"></p>
  
  <p>So the issue is narrowed down to Android just ignoring my Notification. Problem is it doesn't tell me why -_- so I can't fix it. Any experts on the matter see something wrong with my code to call a notification? Does it matter that its on an emulator?</p>