tags:

views:

41

answers:

2

i want to call the activity when user pull down the notification and click on that notification...how can i do that?

A: 

Call setLatestEventInfo() on the Notification object, supplying a PendingIntent that will start your activity when they tap on your entry in the notification drawer. Here is a sample project demonstrating this.

CommonsWare
+1  A: 

Assuming that notif is your Notification object:

Intent notificationIntent = new Intent(this.getApplicationContext(), ActivityToStart.class);
PendingIntent contentIntent = PendingIntent.getActivity(this.getApplicationContext(), 0, notificationIntent, 0);
notif.contentIntent = contentIntent;
Martin