@Override
public void onCreate() {
//提高服务运行级别
Notification noti = new Notification();
noti.icon = R.drawable.ic_launcher;
Intent intent = new Intent();
intent.setAction("com.lqr.testactivity");//在清单文件中对testActivity设置了intent-filter的action值
//点击状态栏的通知后跳转到testActivity界面
PendingIntent contentIntent = PendingIntent.getActivity(getApplicationContext(), 0, intent, 0);
//把服务变为前台服务,从而提高运行级别,达到杀毒软件杀不死该服务的效果
noti.setLatestEventInfo(getApplicationContext(), "标题", "内容", contentIntent );
}