3、清单文件
四、源码资源
一、 前台 Service 通知问题
----
上一篇博客 【Android 进程保活】提升进程优先级 ( 使用前台 Service 提高应用进程优先级 | 效果展示 |...源码资源 ) 实现了一个前台 Service , 在通知栏 , 存在一个通知 ;
二、 设置 startForeground id 参数为 0
----
在开启 Service 时 , 调用的 startForeground...直接使用 startForeground(10, new Notification()) 代码启动即可 ;
startForeground(10, new Notification...());
API Level 18 ~ 25 : 直接使用 startForeground(10, new Notification()) 代码启动 , 但是必须启动两个前台服务进程 , 绑定相同的 id...// 设置 ID 为 0 , 就不显示已通知了 , 但是 oom_adj 值会变成后台进程 11
// 设置 ID 为 1 , 会在通知栏显示该前台服务