У меня есть следующий код. Проблема в том, что когда я нажимаю на панель уведомлений (когда приложение запускается, я вижу текст внутри: By Firstdroid.com текст, но больше ничего, даже если я нажимаю на панель.
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 );