Notification getIntent().getExtras() gets the same bundle
<p>The problem im having is I call sendAffimationNotice() twice passing a unique <code>aff_id</code> each time (as confirmed by printing "putting " + <code>aff_id</code>).</p>

<p>This prints <code>'putting 1'</code> and on the second call <code>'putting 2'</code>.</p>

<p>The phone now has 2 notifications. Though when both are clicked they both have the same ID toasted in the onCreate method on the intents activity.</p>

<p>Both times it prints "ID is: 1" even though both notifications are unique.</p>

<pre><code>public class PossAffNotification{

private static int notif_ID = 1;
private static NotificationManager notificationManager;
private static Notification note;
private static PendingIntent contentIntent;

public static void sendAffimationNotice(Context ctx, String title,String contentText,int aff_id){

    notificationManager = (NotificationManager) ctx.getSystemService(Context.NOTIFICATION_SERVICE);
    note = new Notification(android.R.drawable.btn_star_big_on, contentText, System.currentTimeMillis() );

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

    Intent notificationIntent = new Intent(ctx, com.mindfsck.PossAff.MainActivity.class);
    notificationIntent.putExtra("aff_id",aff_id);
    System.out.println("putting " + aff_id);

    notificationIntent.setAction("com.mindfsck.PossAff.intent.action.aff");

    notificationIntent = notificationIntent.setFlags(Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);

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

    note.setLatestEventInfo(ctx, title, contentText, contentIntent);

    notificationManager.notify(notif_ID,note);

    notif_ID += 1;
}

   };

    public class MainActivity extends Activity{
        @Override
        public void onCreate(Bundle savedInstanceState){

            super.onCreate(savedInstanceState);

            Intent serviceIntent = new Intent(this,PAService.class);
            this.startService(serviceIntent);

            Bundle extras = getIntent().getExtras();
            if(extras !=null) {
                Toast.makeText(getApplicationContext(), "ID is: " + extras.getInt("aff_id"),
                Toast.LENGTH_SHORT).show();
            }
        }
}
</code></pre>
