tags:

views:

56

answers:

0

i am using custom notification...how can i set no of notification is showing?and list out those notification? this is my code...

public void onReceive(Context context, Intent intent) {
        Toast.makeText(context, "coming", Toast.LENGTH_LONG).show();
        Bundle descBundle = intent.getExtras();
        CharSequence desc = descBundle.getString("description");
        int reminderId = descBundle.getInt("reminderId");
        NotificationManager mNotificationManager;
        mNotificationManager = (NotificationManager) context
                .getSystemService(Context.NOTIFICATION_SERVICE);
        PendingIntent contentIntent = PendingIntent.getActivity(context,
                reminderId, new Intent(), PendingIntent.FLAG_UPDATE_CURRENT);
        RemoteViews contentView = new RemoteViews(context.getPackageName(),
                R.layout.main);
        contentView.setImageViewResource(R.id.image, R.drawable.reminder_1);
        contentView.setTextViewText(R.id.text, desc);
        Notification notifyDetails = new Notification();
        notifyDetails.icon = R.drawable.reminder_1;
        notifyDetails.when = System.currentTimeMillis();
        notifyDetails.tickerText = desc;
        notifyDetails.iconLevel = 1;
        notifyDetails.number = reminderId;
        notifyDetails.contentView = contentView;
        notifyDetails.contentIntent = contentIntent;
        mNotificationManager.notify(0, notifyDetails);
    }

i am using this code to show the notification...but it shows only one notification content...but icon shows no of notification...