From 8e4ba1f27ed1df5aef8fc3115a133a75ca9b4dc7 Mon Sep 17 00:00:00 2001 From: EasyChen Date: Fri, 21 Jan 2022 21:17:22 +0800 Subject: [PATCH] =?UTF-8?q?android=E7=82=B9=E9=80=9A=E7=9F=A5=E8=BF=9B?= =?UTF-8?q?=E5=85=A5app=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/app/Http/Helpers.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api/app/Http/Helpers.php b/api/app/Http/Helpers.php index d1fc09b..0ec6e80 100644 --- a/api/app/Http/Helpers.php +++ b/api/app/Http/Helpers.php @@ -80,7 +80,9 @@ function android_send($is_clip, $device_token, $text, $desp = '', $dev = true) $message1->passThrough(0); // 这是一条通知栏消息,如果需要透传,把这个参数设置成1,同时去掉title和descption两个参数 // $message1->payload($payload); // 携带的数据,点击后将会通过客户端的receiver中的onReceiveMessage方法传入。 $message1->extra(Builder::notifyForeground, 1); // 应用在前台是否展示通知,如果不希望应用在前台时候弹出通知,则设置这个参数为0 - $message1->notifyId(2); // 通知类型。同样的类型的通知会互相覆盖,不同类型可以在通知栏并存 + $message1->extra(Builder::notifyEffect, 1); + $message1->notifyType(4); + $message1->notifyId(rand(1, 100)); // 通知类型。同样的类型的通知会互相覆盖,不同类型可以在通知栏并存 $message1->build(); $sender = android_sender();