1.setForeground(int, Notification) 2.在 AndroidManifest.xml 文件中的service 中添加 android:persistent="true" 可避免进程被系统杀死