Android push notification message app icon and title not showing

I am using http://ift.tt/1oG67sm package for my push notification on a laravel app. It works on iOS but on android I’ve encountered this issue. The title and icon is missing when I open the notification bar.

Can you help me figure out why the title is not shown on android. Thanks!

Code:


$notification_message = PushNotification::Message( $message->message, array(
'badge' => 1,
'actionLocKey' => 'Read new message: '. $message->subject,
'locKey' => $message->subject,
'launchImage' => url($message->image)
));

foreach ($target_devices as $platform => $devices) {

$collection = PushNotification::app($platform)
->to( PushNotification::DeviceCollection($devices) )
->send($notification_message);

// get response for each device push
foreach ($collection->pushManager as $push) {
$response = $push->getAdapter()->getResponse();

// dd($response);
}
}

Log:


object(ZendServiceGoogleGcmResponse)[367]
protected 'id' => int 5820913987510378862
protected 'cntSuccess' => int 2
protected 'cntFailure' => int 1
protected 'cntCanonical' => int 1
protected 'message' =>
object(ZendServiceGoogleGcmMessage)[357]
protected 'registrationIds' =>
array (size=3)
0 => string 'xxxxx' (length=140)
1 => string 'yyyyy' (length=152)
2 => string 'zzzz' (length=140)
protected 'collapseKey' => null
protected 'data' =>
array (size=4)
'badge' => int 1
'actionLocKey' => string 'Read new message: android test' (length=30)
'locKey' => string 'android test' (length=12)
'message' => string 'android testandroid testandroid testandroid test' (length=48)
protected 'delayWhileIdle' => boolean false
protected 'timeToLive' => int 600
protected 'restrictedPackageName' => null
protected 'dryRun' => boolean false
protected 'results' =>
array (size=3)
0 =>
array (size=1)
'error' => string 'NotRegistered' (length=13)
1 =>
array (size=1)
'message_id' => string '0:1452069848335048%e158bc73f9fd7ecd' (length=35)
2 =>
array (size=2)
'registration_id' => string 'xxxxx' (length=152)
'message_id' => string '0:1452069848336639%e158bc73f9fd7ecd' (length=35)
protected 'response' =>
array (size=5)
'multicast_id' => int 5820913987510378862
'success' => int 2
'failure' => int 1
'canonical_ids' => int 1
'results' =>
array (size=3)
0 =>
array (size=1)
...
1 =>
array (size=1)
...
2 =>
array (size=2)

from Newest questions tagged laravel-5 – Stack Overflow http://ift.tt/1Z4XK6q
via IFTTT

Related Posts

Codeigniter : Parse error: syntax error, unexpected ‘const’ (T_CONST), expecting variable (T_VARIABLE) in Laravel project

I’m getting following error: **Parse error: syntax error, unexpected ‘const’ (T_CONST), expecting variable (T_VARIABLE)** Note : It’s working in local but facing issue in production server. private…

Firebase receive notification while tab is active or on focus

What i want is to be able to perform an action when a user receives a notification while the browser is open and tab is active or…

Laravel’s alias loader does not find class

We have a legacy project that we cannot update and we need to make some changes in symfony’s Response.php in vendor. We have solved this by copying…

Laravel 5 – generic document management

I have a system where you can create different types of unique documents. For instance, one document is called Project Identified and this expects certain inputs. Originally,…

Laravel Nova limit the results in indexQuery

I ran intro a situation where I need to limit the results of a resource to only 3 results. To be more specific, based on the logged…

Auditoria en laravel 5.8 [closed]

Cómo puedo automatizar el registro de actividades de un usuario en laravel? Si un usuario ingresa a un app de laravel, debo guardar toda su actividas, a…

Leave a Reply

Your email address will not be published.