title: Android show notification from BroadcastReceiver
body: <p>I have a class which extends BroadcastReceiver that gets called whenever new Wifi scan results are available (the receiver is registered in the manifest with the Scan_Results broadcast as the intent-filter).</p>
  
  <p>From this class, I want to be able to show a notification to the user. Currently, I pass the context that is received as a parameter in the onReceive method of my broadcast intent class to a "show notification" method of another class. </p>
  
  <p>When it gets to the line:</p>
  
  <pre><code>myNotificationManager.notify(notificationId, notification);
  </code></pre>
  
  <p>it fails with the following exception:</p>
  
  <pre><code>java.lang.IllegalArgumentException: contentView required: pkg=com.mumfordmedia.trackify id=2131034122 notification=Notification(vibrate=null,sound=null,defaults=0x0,flags=0x0)
  </code></pre>
  
  <p>Any idea why this is happening? All I can think of is because the context that I am getting from the onReceive parameter is not ... for lack of a better phrase, "right for the job"...</p>
  
  <p>Any ideas?
  Thanks,
  Max.</p>