Check with adb logcat to see if there was a problem launching your activity. My initial guess is that you forgot to declare this activity in the AndroidManifest.xml file. You also should not need to use FLAG_CANCEL_CURRENT, nor should you need to use Main.this.getBaseContext, as any Context would suffice, including Main.this.
On Jun 22, 1:05 am, mac-systems <[email protected]> wrote: > Hello, > > i want to Inform the User about an Event from my Application using the > NotificationManager and then invoking a Activity with details about > the Event. > > As far as i know it should work like this: > > final NotificationManager mManager = > (NotificationManager) > getSystemService(Context.NOTIFICATION_SERVICE); > > Intent intent = new Intent(Main.this, > AlarmNotificationDetail.class); > > Notification notification = new > Notification(R.drawable.icon, > "Notify", System.currentTimeMillis()); > notification.setLatestEventInfo(Main.this, > "App Name", > "Description of the notification", PendingIntent > > .getActivity(Main.this.getBaseContext(), 0, intent, > PendingIntent.FLAG_CANCEL_CURRENT)); > mManager.notify(815, notification); > > This put an Event in my Statusbar, but it do not forward to the > AlarmNotificationDetail.class Activity. Main.this is the Context from > which this Event is triggered. > > The Activity to Invoke looks live this and should bring up a Toast > when created: > > public class AlarmNotificationDetail extends Activity > { > > /* > * (non-Javadoc) > * > * @see android.app.Activity#onCreate(android.os.Bundle) > */ > @Override > protected void onCreate(Bundle savedInstanceState) > { > super.onCreate(savedInstanceState); > setContentView(R.layout.alarmnotificationdetail); > > Toast.makeText(this, "this is a toast", Toast.LENGTH_LONG); > } > > } > > Anyone can help me out ? > > regards, > Mac --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

