Reputation: 2527
I want to send an image and icon in my Push notification from my Serverside(php) to my app.
I have searched on Google but was unable to get the proper result. I get FCM PHP Code. I use these code for sending notification but when I use "image and icon" parameter image not receive in notification.
In GCM it's easy to send icon and image in Push notification
$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"
) ,
If anyone can send image and icon in notification using FCM please help me.
Upvotes: 8
Views: 12580
Reputation: 2527
Simply, I change my plugin and use phonegap-plugin-push v2.0.x and it work fine. Now I am able to send big image in the notification.
Upvotes: 2
Reputation: 327
Notification image must be PNG image. Replace jpg image with png image.
Upvotes: 0