Null pointer access: The variable context can only be null at this location
<p>i keep getting this error on line but if i remove the null i get errors on context telling me to initialize variable..</p>

<pre><code>nm = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
</code></pre>

<p><strong>this is my code</strong></p>

<pre><code>            public void createDialog(Enter_med enter_med) {
        // TODO Auto-generated method stub

        Context context = null;

        NotificationManager nm;
          nm = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);        
          CharSequence from = "VIPUL";
          CharSequence message = "Crazy About Android...";
          PendingIntent contentIntent = PendingIntent.getActivity(context, 0,
            new Intent(), 0);
          Notification notif = new Notification(R.drawable.ic_launcher,
            "Crazy About Android...", System.currentTimeMillis());
          notif.setLatestEventInfo(context, from, message, contentIntent);
          nm.notify(1, notif);
    }
</code></pre>
