我不知道为什么当我显示通知时,右上角会显示一些 1/4/70 日期?那是什么?我该如何摆脱它?
代码:
public static void showNotification(int id, String message, String title, String body)
{
int drawable = 0;
switch (id)
{
case NOTIFICATION_NEW_MAIL:
drawable = R.drawable.ic_notify_mail;
break;
case NOTIFICATION_AVAILABLE_TRIPS:
drawable = R.drawable.ic_notify_trip;
break;
}
NotificationManager notifyManager = (NotificationManager)MyApplication.Me.getSystemService(Context.NOTIFICATION_SERVICE);
Notification notification = new Notification(drawable, message, SystemClock.elapsedRealtime() + 1000);
notification.defaults |= Notification.DEFAULT_SOUND;
Intent notificationIntent= new Intent(MyApplication.Me, MailListActivity.class);
switch (id)
{
case NOTIFICATION_NEW_MAIL:
notificationIntent = new Intent(MyApplication.Me, MailListActivity.class);
break;
case NOTIFICATION_AVAILABLE_TRIPS:
notificationIntent = new Intent(MyApplication.Me, TripListActivity.class);
break;
}
PendingIntent contentIntent = PendingIntent.getActivity(MyApplication.Me, 0, notificationIntent, 0);
notification.setLatestEventInfo(MyApplication.Me, title, body, contentIntent);
notifyManager.notify(id, notification);
}
截屏: