private void showNotification() {
NotificationManager notificationManager = (NotificationManager) context
.getSystemService(android.content.Context.NOTIFICATION_SERVICE);
Notification notification = new Notification(R.drawable.icon,
"在EoeAndroidReceiver1中", System.currentTimeMillis());
PendingIntent contentIntent = PendingIntent.getActivity(context, 0,
new Intent(context, ActivityMain.class), 0);
notification.setLatestEventInfo(context, "在EoeAndroidReceiver1中", null,
contentIntent);
notificationManager.notify(NOTIFICATION_ID, notification);
NotificationManager notificationManager = (NotificationManager) context
.getSystemService(android.content.Context.NOTIFICATION_SERVICE);
Notification notification = new Notification(R.drawable.icon,
"在EoeAndroidReceiver1中", System.currentTimeMillis());
PendingIntent contentIntent = PendingIntent.getActivity(context, 0,
new Intent(context, ActivityMain.class), 0);
notification.setLatestEventInfo(context, "在EoeAndroidReceiver1中", null,
contentIntent);
notificationManager.notify(NOTIFICATION_ID, notification);
}
好记性不如烂博客记录