title: Notification `notify()` cannot be referenced from a static context
body: <p>I'm using a simple code to push notifications in Android through a function. This function is the following : </p>
  
  <pre><code>public void sendNotification(View view) {
  
          NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(this).setContentTitle("My notification").setContentText("Hello World!");
  
          NotificationManager mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
  
          NotificationManager.notify().mNotificationManager.notify(001, mBuilder.build());
      }}
  </code></pre>
  
  <p>This is example function i picked on a website. </p>
  
  <p>Everything is ok, the <code>NotificationCompat.builder</code> doesn't return any error. But the first <code>notify()</code> on the last line return the following error : <code>Non-static method 'notify()' cannot be referenced from a static context</code>. </p>
  
  <p>I really don't understand why. The void is placed in my <code>MainActivity.java</code>inside my <code>public class MainActivity extends AppCompatActivity {}</code></p>
  
  <p>EDIT : </p>
  
  <p>The solution was to remove <code>NotificationManager.notify().</code> from <code>mNotificationManager.notify(001, mBuilder.build());</code></p>