I’m not sure why when I’m showing notification there is some 1/4/70 date displaying in a top right corner? What is that? How do I get rid of it?
Code:
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);
}
Screenshot:

That notification constructor is apparently deprecated, but anyway the last parameter in that constructor, when, should refer to in unix time what time the notification was created. SystemClock.getEllapsed time returns the amount of time since the system was booted http://developer.android.com/reference/android/os/SystemClock.html. E.g. in your case, you’re saying the notication was created very recently, but in unix time you’re saying you’re really close to 1970. Use System.getCurrentTimeMillis() instead.
EDIT: By close to 1970 I mean Unix time is measured in milliseconds from the start of 1970. So if you say 0ms you’re saying Jan 1. If you pass in 86,400,000ms (ms in a day) you’re saying Jan 2, 1970. By passing in the elapsed time since boot, it’ll probably report you as a day or two from Jan 1, 1970. See http://en.wikipedia.org/wiki/Unix_time