I have a notification which has a attached intent, how do I pass data to the intents activity?
<pre><code>notificationManager = (NotificationManager) ctx.getSystemService(Context.NOTIFICATION_SERVICE);
note = new Notification(android.R.drawable.btn_star_big_on, "Ticker Text", System.currentTimeMillis() );

note.defaults |= Notification.DEFAULT_SOUND;
note.defaults |= Notification.DEFAULT_VIBRATE;
note.defaults |= Notification.FLAG_AUTO_CANCEL;

Intent notificationIntent = new Intent(ctx, com.mindfsck.PossAff.MainActivity.class);
//Intent notificationIntent = new Intent();
notificationIntent.setAction(Intent.ACTION_MAIN);
notificationIntent = notificationIntent.setFlags(Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);

contentIntent = PendingIntent.getActivity(ctx, 0, notificationIntent, 0);

note.setLatestEventInfo(ctx, "contentTitle", "contentText", contentIntent);

note.number = 1;  //Just created notification so number=1. Remove this line if you dont want numbers

notificationManager.notify(notif_ID,note);
</code></pre>

<p>I have a notification with a intent. When you click the notification it launches the activity however in MainActivity I have no idea how to consume the intent. I also assume once I know how to read the Intent in my Main Activity I can use putExtra() to pass data.</p>

<p>Thanks</p>
