From d91ecb5f2bec90199f83bd181b00d78bc4207cda Mon Sep 17 00:00:00 2001 From: EasyChen Date: Sat, 22 Jan 2022 15:41:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0channel=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/app/Http/Helpers.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/api/app/Http/Helpers.php b/api/app/Http/Helpers.php index 0ec6e80..07bfbc9 100644 --- a/api/app/Http/Helpers.php +++ b/api/app/Http/Helpers.php @@ -81,8 +81,10 @@ function android_send($is_clip, $device_token, $text, $desp = '', $dev = true) // $message1->payload($payload); // 携带的数据,点击后将会通过客户端的receiver中的onReceiveMessage方法传入。 $message1->extra(Builder::notifyForeground, 1); // 应用在前台是否展示通知,如果不希望应用在前台时候弹出通知,则设置这个参数为0 $message1->extra(Builder::notifyEffect, 1); - $message1->notifyType(4); - $message1->notifyId(rand(1, 100)); // 通知类型。同样的类型的通知会互相覆盖,不同类型可以在通知栏并存 + $message1->extra('channel_id', 'high_system'); + $message1->extra('channel_name', '服务提醒'); + $message1->notifyType(3); + $message1->notifyId(rand(1, 1024)); // 通知类型。同样的类型的通知会互相覆盖,不同类型可以在通知栏并存 $message1->build(); $sender = android_sender();