title: trouble implementing android notifications
body: <p>I would greatly appreciate any help with troubleshooting my use of notifications within the Android emulator. I have tried several different versions without success and the code below seems to distill the needed elements down to the minimum. The problem is that the notification simply doesn't get sent. I hear the "click" noise when I tap the button in the emulator but nothing else.</p>
  
  <p>I had read somewhere that having the wrong type of image may cause problems and I have tried several. The one I have included now is generated using Vector Asset within the res folder. It feels like there is something simple that I am missing but from what I can see from all the examples I have found online the basic elements are sound. </p>
  
  <p>Any help or direction would be appreciated.</p>
  
  <pre><code>import android.app.NotificationManager;
  import android.app.PendingIntent;
  import android.content.Intent;
  import android.os.Bundle;
  import android.support.v4.app.NotificationCompat;
  import android.support.v7.app.AppCompatActivity;
  import android.view.View;
  
  public class MainActivity extends AppCompatActivity {
  
      NotificationCompat.Builder notification;
      private static final int idNumber = 123;
  
          @Override
          protected void onCreate(Bundle savedInstanceState) {
              super.onCreate(savedInstanceState);
              setContentView(R.layout.activity_main);
  
              notification = new NotificationCompat.Builder(this);
              notification.setAutoCancel(true);
          }
  
      public void sendNotification(View view){
          notification.setSmallIcon(R.drawable.ic_android_black_24dp);
          notification.setContentText("This is the notification message");
          notification.setContentTitle("Notification");
          notification.setTicker("There is a notification");
          notification.setWhen(System.currentTimeMillis());
  
          Intent intent = new Intent(this, MainActivity.class);
          PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
          notification.setContentIntent(pendingIntent);
  
          NotificationManager nm = (NotificationManager)getSystemService(NOTIFICATION_SERVICE);
          nm.notify(idNumber, notification.build());
      }
  }
  </code></pre>