Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/user-interface/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Notifications 如何删除android前台服务通知开始时的持续时间?_Notifications_Foreground Service_Android 8.1 Oreo - Fatal编程技术网

Notifications 如何删除android前台服务通知开始时的持续时间?

Notifications 如何删除android前台服务通知开始时的持续时间?,notifications,foreground-service,android-8.1-oreo,Notifications,Foreground Service,Android 8.1 Oreo,setWhen(0)使通知中的持续时间为空 NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(this) .setSmallIcon(R.drawable.notification_icon) .setContentTitle("My notification") .setContentText("Hello World!") .setContentIntent(pendingIntent) .setWhen

setWhen(0)使通知中的持续时间为空

NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(this)
.setSmallIcon(R.drawable.notification_icon)
.setContentTitle("My notification")
.setContentText("Hello World!")
.setContentIntent(pendingIntent)
.setWhen(0);