我正在使用自定义通知...我如何设置没有通知显示?并列出这些通知? 这是我的代码...多个通知与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);
}
我使用此代码显示通知...但它仅显示一个通知内容...但是图标不显示的通知...
我们可以在该管理器中添加多个通知吗? – Kandha 2010-09-07 09:11:20