i want to show the notification icon number but nothing showed, there is my code :
private static void generateNotification(Context context, String message,
String title, String url) {
mContext = context;
int icon = R.drawable.ic_launcher;
long when = System.currentTimeMillis();
int pendingNotificationsCount = App.getPendingNotificationsCount() + 1;
NotificationManager notificationManager = (NotificationManager) context
.getSystemService(Context.NOTIFICATION_SERVICE);
Notification notification = new Notification(icon, message, when);
// detail intent
Intent notificationIntent = new Intent(context, MainActivity.class);
notificationIntent.putExtra("urlmessage", url);
Log.i(null, "url de message " + url);
notificationIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP
| Intent.FLAG_ACTIVITY_SINGLE_TOP);
PendingIntent intent = PendingIntent.getActivity(context, 0,
notificationIntent, PendingIntent.FLAG_ONE_SHOT);
notification.setLatestEventInfo(context, title, message, intent);
notification.flags |= Notification.FLAG_AUTO_CANCEL;
notification.defaults |= Notification.DEFAULT_SOUND;
notification.defaults |= Notification.DEFAULT_VIBRATE;
App.setPendingNotificationsCount(pendingNotificationsCount);
notification.number = pendingNotificationsCount;
notificationManager.notify(pendingNotificationsCount, notification);
}
did i miss something ??