实现这一目标的代码大致如下: Notification foregroundNotification = this.getCurrentForegroundNotification// Start service in foreground with notification
this.startForeground(MyService.FOREGROUND_ID, foregroundNotificationprivate void updateForegr
com.example.lockscreen_test.R.drawable;
long notificationTimestamp = System.currentTimeMillis();
_foregroundNotification = new Notificationstartmyactivitypendinginte