tôi đang sử dụng thông báo tùy chỉnh ... làm cách nào tôi có thể đặt thông báo không hiển thị? Và liệt kê các thông báo đó? đây là mã của tôi ...Nhiều thông báo có một biểu tượng trên thanh trạng thái trong android
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);
}
tôi đang sử dụng mã này để hiển thị thông báo ... nhưng nó chỉ hiển thị một nội dung thông báo ... nhưng biểu tượng cho thấy không có thông báo ...
chúng tôi có thể thêm nhiều thông báo vào người quản lý đó không? – Kandha