2011-01-14 14 views
0

다음 코드가 있습니다. 응용 프로그램은 내가 내부의 텍스트를 볼 출시 때 내가 (알림 표시 줄을 클릭하면 문제는 다음과 같습니다. 내가 바를 클릭 Firstdroid.com 텍스트,하지만 아무것도으로해도 내가 쓰고Android 알림이 작동하지 않습니다.

NotificationManager mNotManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); 

    String MyText = "Text inside: By Firstdroid.com"; 
    Notification mNotification = new Notification(
      R.drawable.icon,    // An Icon to display 
      MyText,       // the text to display in the ticker 
      System.currentTimeMillis()  ); // the time for the notification 
    mNotification.defaults |= Notification.DEFAULT_SOUND; 
    String MyNotifyTitle = "Firstdroid Rocks!!!"; 
    String MyNotifiyText = "Firstdroid: our forum at www.firstdroid.com"; 
    Intent MyIntent = new Intent(getApplicationContext(), HelloAndroid2.class); 

    MyIntent.putExtra("extendedTitle", MyNotifyTitle); 
    MyIntent.putExtra("extendedText" , MyNotifiyText); 
    PendingIntent StartIntent = PendingIntent.getActivity(getApplicationContext(),0,MyIntent,PendingIntent.FLAG_CANCEL_CURRENT); 

    mNotification.setLatestEventInfo( getApplicationContext(), 
      MyNotifyTitle, 
      MyNotifiyText, 
      StartIntent); 

    /* Sent Notification to notification bar */ 
    mNotManager.notify( SIMPLE_NOTIFICATION_ID , mNotification); 
+0

나는 당신이 정확히 무엇인지 확신하지 못한다. 에지고있다. 좀 더 자세한 정보를 제공해 주시겠습니까? – DanO

+0

나는 그것을 해결했다. 아무런 문제도 없었습니다. 녹색 메모장과 같은 버튼을 클릭하는 대신 알림을 표시해야한다는 것을 모릅니다. – erdomester

답변

0

이 질문을 닫습니다.

내 의견에서 복사 : 문제가 해결되지 않았습니다. 녹색 메모장을 클릭하는 대신 알림을 가져와야한다는 것을 알지 못했습니다. 버튼

관련 문제