/**
* 状态 栏通知
* @param titlemsg 提示信息
* @param title 标题
* @param msg 详细信息
* @param id 图片id 不能一些
*/
public void shownotificationManager(String titlemsg,String title, String msg,int id)
{
NotificationManager notificationManager=(NotificationManager) getSystemService(NOTIFICATION_SERVICE);
Notification notification =new Notification(id, titlemsg, System.currentTimeMillis());
notification.defaults=Notification.DEFAULT_SOUND;
PendingIntent contentIntent=PendingIntent.getActivity(this, 0, getIntent(), 0);
notification.setLatestEventInfo(this,title, msg, contentIntent);
notification.flags=Notification.FLAG_NO_CLEAR;
notificationManager.notify(id, notification);
}
* 状态 栏通知
* @param titlemsg 提示信息
* @param title 标题
* @param msg 详细信息
* @param id 图片id 不能一些
*/
public void shownotificationManager(String titlemsg,String title, String msg,int id)
{
NotificationManager notificationManager=(NotificationManager) getSystemService(NOTIFICATION_SERVICE);
Notification notification =new Notification(id, titlemsg, System.currentTimeMillis());
notification.defaults=Notification.DEFAULT_SOUND;
PendingIntent contentIntent=PendingIntent.getActivity(this, 0, getIntent(), 0);
notification.setLatestEventInfo(this,title, msg, contentIntent);
notification.flags=Notification.FLAG_NO_CLEAR;
notificationManager.notify(id, notification);
}