Ich habe den folgenden Code. Das Problem ist, wenn ich auf der Benachrichtigungsleiste klicken (wenn App gestartet i siehe Text innen. Durch Firstdroid.com Text, aber nichts anderes, auch wenn ich auf der Bar klickenAndroid Benachrichtigung funktioniert nicht
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);
Ich bin nicht genau sicher, was Sie kommen. Könnten Sie uns noch mehr Details geben? – DanO
Ich habe es gelöst. Es gab kein Problem, ich wusste einfach nicht, dass ich die Benachrichtigung runterziehen musste, anstatt auf den grünen Notizblock-ähnlichen Knopf zu klicken. – erdomester