【发布时间】:2018-12-24 07:22:18
【问题描述】:
我在 android 中测试 FCM,但在三星设备中没有收到通知。
我发给测试的php代码。
问题:删除字段通知时 未将通知发送到设备三星未发送数据
希望你能帮助我
<?php
Replace with the real server API key from Google APIs
$apiKey = "xxxxxxx";
Replace with the real client registration IDs
$registrationIDs = array( "xxxxx")
$fields = array(
'priority' => 'high',
'registration_ids' => $registrationIDs,
this line => 'notification' => array("priority"=>'high',
"content_available" => true,
"mutable_content" => true,
'priority'=>'high',
"title" => $message,
"body" => $nickname ." Posteo una Inspección",
"sound"=>"default",
"click_action"=> "OPEN_ACTIVITY_CHAT"),
'data' => array(
"title" => $message,
"body" => $nickname ." posteo una Inspección",
"type" => "0",
"content-available"=> "1","icon" > "ic_launcher"),
);
$headers = array(
'Authorization: key=' . $apiKey,
'Content-Type: application/json'
);
?>
【问题讨论】:
标签: php android firebase firebase-cloud-messaging