사물에서 이벤트 발생 시 php로 푸시 알림을 안드로이드앱에 보내는구조인데
아이콘을 어떻게 설정할 수 있나요??
$notification = array('title' =>$title , 'text' => '', 'sound' => 'default', 'badge' => '1');
$arrayToSend = array('registration_ids' => $registration_ids, 'notification' => $notification,'priority'=>'high');
$json = json_encode($arrayToSend); $headers = array();
$headers[] = 'Content-Type: application/json';
$headers[] = 'Authorization: key='. $serverKey;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST,"POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, $json);
curl_setopt($ch, CURLOPT_HTTPHEADER,$headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
//Send the request
$response = curl_exec($ch);
//Close request
if ($response === FALSE) { die('FCM Send Error: ' . curl_error($ch)); }
curl_close($ch);