public static void doNotification(Context context, String text){
  
  Notification notification = new Notification(R.drawable.ic_launcher,
    "새로운 메시지가 있습니다", System.currentTimeMillis());
  notification.flags |= Notification.FLAG_AUTO_CANCEL;

  notification.setLatestEventInfo(context, text, text, null);
  NotificationManager nm;
  nm.notify(0, notification);
  }

 

여기서 nm을 초기화 하라는데요... null로 하면 NullPointerException뜨고

getSysytemService로 하면 비static이라서 static참조를 수행할 수 없다네요...

 

어떻게 수정해야 되나요???ㅠ