notification 을 띄우고 이걸 클릭시 액티비티를 실행하는데

해당 액티비티에 putExtra로 값을 전달하여 초기화 하려 합니다. 그런데 이게 안되는데 이유를 모르겠네요..

 

일단 실행되는 액티비티의 코드 입니다.


 Bundle bundle = getIntent().getExtras();
 boolean isServiceAlive = bundle.getBoolean("SERVICE_ALIVE", false);

 

이전 액티비티에서 boolean 값을 받아서 초기화합니다.

그런데 nullpointerException 이 뜹니다.. 뜨는 곳을 보니 bundle이 Null이네요 ;;

 

다음은 Notification을 띄우는 소스입니다.

 

Intent notiIntent = new Intent(context, ListenActivity.class);
notiIntent.putExtra("SERVICE_ALIVE", true);
notiIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
PendingIntent content = PendingIntent.getActivity(context, 0, notiIntent, 0);

 

 

왜 bundle이 Null로 올까요 ;;