【发布时间】:2013-08-04 11:16:37
【问题描述】:
我正在从 PHP 向 Android 设备发送推送通知。 除了我 不希望 消息崩溃之外,一切正常。 这是我的代码
$random_collapse = rand(11, 100);
$fields = array(
'registration_ids' => $receivers,
'data' => array( "message" => $message ),
'collapse_key' => "{$random_collapse}",
"time_to_live" => 25000
);
请建议。
编辑
这个我也用过
$fields = array(
'registration_ids' => $receivers,
'data' => array( "message" => $message ),
);
但还是没有运气
【问题讨论】:
-
你如何确定它们是否被折叠?您的应用如何处理来自 GCM 的消息?如果您使用相同的
NOTIFICATION_ID,设备可能会折叠消息。
标签: php push-notification google-cloud-messaging