Notificaction event receive, but not notification showing on android #228

Closed
juanredondo opened this Issue Oct 14, 2015 · 3 comments

Projects

None yet

3 participants

@juanredondo

I have been registered a template
var template = "{ "data" : {"title":"$(title)","message":"$(message)", "additionalData":"$(additionalData)"}}";
for using with azure mobile services.

The notification event works as expected but the notification is not showing.

Previous versions (stable 1.3.0), showing the notification as expected.

This is the log :

/GCM (13583): GCM message com.nomastickets 0:1444822708974062%a283cc76f9fd7ecd
E/ThermalEngine( 323): [GPU_MON] 0 percent. Current Sampling Time is 1 sec
D/PushPlugin_GCMIntentService(15389): onMessage - from: 194122939449
D/PushPlugin_GCMIntentService(15389): mormalize extras
D/PushPlugin_GCMIntentService(15389): key = additionalData
D/PushPlugin_GCMIntentService(15389): key = title
D/PushPlugin_GCMIntentService(15389): key = message
D/PushPlugin_GCMIntentService(15389): key = collapse_key
D/PushPlugin(15389): convert extras to json
D/PushPlugin(15389): key = additionalData
D/PushPlugin(15389): key = title
D/PushPlugin(15389): key = message
D/PushPlugin(15389): key = collapse_key
D/PushPlugin(15389): key = foreground
V/PushPlugin(15389): extrasToJSON: {"title":"Titulo de prueba","message":"Mensajito de prueba","additionalData":{"additionalData":"{aditional_data}","collapse_key":"do_not_collapse","foreground":true}}
I/chromium(15389): [INFO:CONSOLE(124)] "notification: Mensajito de prueba", source: file:///android_asset/www/js/push.js (124)
I/[SystemUI]StatusBar.NetworkController( 1578): onSignalStrengthsChanged signalStrength=SignalStrength: 11 0 -91 -70 -120 -1 -1 99 2147483647 2147483647 2147483647 2147483647 2147483647 gsm|lte 11 level=4
D/TelephonyIcons( 1578): updateDataType sub=0, type=10, inetCondition=1 showAtLeast3G=false show4GforLte=true hspaDistinguishable=false
D/TelephonyIcons( 1578): data type item name: array/telephony_data_type_sim1

@smdvdsn
Contributor
smdvdsn commented Oct 14, 2015

By default if your app is in the foreground the notification will not show only your js will be called. As it looks like you are using master you could try adding the "forceShow" option to your init call to always show the notification.

@macdonst
Member

@juanredondo As @smdvdsn said I believe it is working properly. Try minimizing your app and sending the push, you should see the notification in the shader. When the app is in the foreground you will get the 'notification' event.

After you have a chance to re-test and your issue is resolved please come back and close this issue.

@juanredondo

Ok. You are right. I force the notification to be show anyways.

Thanks for your explanaition

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment