我在我的应用程序中使用状态栏通知并在单击按钮时发送它。但是当通知到达时,打开它显示错误的日期(在我的情况下它显示 1/1/1970)。
我正在使用以下代码显示状态栏通知。
@Override
public void onClick(View v)
{
// TODO Auto-generated method stub
NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
Notification notification = new Notification(R.drawable.ic_launcher, "Notify", 1000);
Context context = getApplicationContext();
Intent intent = new Intent(this, NotificationActivity.class);
PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, intent, 0);
notification.setLatestEventInfo(context, "TITLE", "MESSAGE", pendingIntent);
notificationManager.notify(R.id.button1, notification);
}