过去,有一个参数可以传递多个设备 ID(registration_ids)以在 Android 设备中发送通知。但由于旧版本的 FCM API 已弃用,并且新版 FCM API v1 可用...
以前,Android 设备发送通知时会有一个参数传递多个设备 ID(registration_ids)。但是由于旧版 FCM API 已弃用,并且有新版 FCM API v1 可用,现在如何在 API 中传递多个设备 ID?
$notification = json_encode([
"message" => [
"token" => $myDeviceId, //this is single but I want to pass an array to send notification to specific multiple devices
"notification" => [
"body" => $data['description'],
"title" => $data['title'],
],
"android" => [
"priority" => "HIGH",
],
]
]);