如何在Android中更新前台服务的通知文本?
我在Android中设置了前台服务。我想更新通知文字。我正在创建如下所示的服务。 如何更新此前台服务中设置的通知文本?更新通知的最佳做法是什么?任何示例代码将不胜感激。 public class NotificationService extends Service { private static final int ONGOING_NOTIFICATION = 1; private Notification notification; @Override public void onCreate() { super.onCreate(); this.notification = new Notification(R.drawable.statusbar, getText(R.string.app_name), System.currentTimeMillis()); Intent notificationIntent = new Intent(this, AbList.class); PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, notificationIntent, 0); this.notification.setLatestEventInfo(this, getText(R.string.app_name), "Update This Text", pendingIntent); startForeground(ONGOING_NOTIFICATION, …