简单的显示一个通知栏提醒
Notification notification = new Notification(icon, tickerText, when);
//点击可以取消通知
notification.flags=Notification.FLAG_AUTO_CANCEL;
//通知时亮屏,震动,提示音
notification.defaults = Notification.DEFAULT_ALL;
//通知等设置
notification.ledARGB=0x00ff00;
notification.ledOffMS=100;
notification.ledOnMS=100;
//定义下拉通知栏时要展现的内容信息
CharSequence contentTitle = "效率大师打卡提醒";
CharSequence contentText = "亲~不要忘了打卡呦~";
Intent notificationIntent = new Intent(context, MainActivity.class);
PendingIntent contentIntent = PendingIntent.getActivity(context, 0,notificationIntent, 0);
notification.setLatestEventInfo(context, contentTitle, contentText,contentIntent);
mNotificationManager.notify(1, notification);