Show single screen with different data for notification
<p>From web service I have received list of data.I have to show the list of notification for the received data.To show notification I have used following code.But when I clicked the notification item I can able to view the last data from the List. How to solve this.</p>

<p>For example if list item 1 has the name = "name1" and list item 10 has the name="name 10".
when I clicked the notification 1. It show's the details about the list item 10</p>

<pre><code> ArrayList&lt;MYObject&gt; list= &lt;List of data from webservice&gt;
 ....
  for(int i=1;i&lt;list.size();i++){
    createNotification(list.get(i),i);
 }
.....
........




public void createNotification(MYObject obj,
        int notificationId) {


    NotificationManager notificationManager = (NotificationManager) context
            .getSystemService(Context.NOTIFICATION_SERVICE);

    Notification myNotification = new Notification(
            R.drawable.notification_icon, "Title!", System.currentTimeMillis());

    String notificationTitle = "My Title";
    String notificationText = "My Notification text";

    Intent myIntent = new Intent(context.getApplicationContext(),
            DetailView.class);
    myIntent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
    myIntent.putExtra("detail", obj);

    PendingIntent pendingIntent = PendingIntent.getActivity(
            context.getApplicationContext(), 0, myIntent, 0);
    myNotification.defaults |= Notification.DEFAULT_SOUND;
    myNotification.flags |= Notification.FLAG_NO_CLEAR;
    myNotification.setLatestEventInfo(context, notificationTitle,
            notificationText, pendingIntent);
    notificationManager.notify(notificationId, myNotification);

}
</code></pre>
