让一个Android应用一直运行在后台,不容易被杀死
使用startForeground();*在serVice的onCreat()方法中调用startForeground()方法Notification notification = new Notification();
//通知栏没有展开时的显示内容
notification.icon = R.mipmap.ic_launcher;
notification.tickerText =
原创
2016-12-27 15:46:43 ·
12790 阅读 ·
1 评论