当我创建Notification时,我想知道是否应该调用startForeground(id,notification)。或者可以打电话给NotificationManger.notify(id,通知)吗?这是我带来的样品 public int onStartCommand(Intent intent, int flags, int startId) {pnextIntent).build();
}
在#1、#2
我试图创建一个安静的Android前台通知,并允许用户手动隐藏前景通知。我已经创建了一个自定义BroadcastReceiver来打开通知设置页面,并使用代码设置通知的意图。但是,这会导致崩溃,并出现以下错误:
class MyService : Service privateSetContentText(&