我想把推送通知中的图片和图标从我的服务器端(Php)发送到我的应用程序。

我已经在谷歌上搜索过了,但是没有得到合适的结果。我得到了FCM PHP Code。我使用这些代码来发送通知,但是当我使用"image and icon“参数时,在通知中不会接收到图像。
在GCM中,很容易在推送通知中发送图标和图像
$fields = array(
'registration_ids' => $registrationIDs,
'data' => array(
"title" => "SamplePush Application",
"style" => "inbox"; //picture/inbox,
"message" => "I am just testing Push notification",
"notId" => "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"summaryText" => "Venha provar os nossos Gins",
"image" => "http://gintonico.com/content/uploads/2015/03/fontenova.jpg",
"picture" => "http://media5.letsbonus.com/products/285000/285006/14014409744462-0-1700x690.jpg"
) ,如果有人可以发送图片和图标通知使用FCM,请帮助我。
发布于 2017-01-18 19:33:05
发布于 2017-01-17 02:59:12
通知图像必须为PNG图像。用png图像替换jpg图像。
https://stackoverflow.com/questions/40736172
复制相似问题