Closed woshikj closed 7 years ago
Okay i've solved the GCM data being nulled. But the notification font is too big for locally sent notifications using the sendLocalNotification method.
Notification Tray Icon is still unable to change to what i want. I see from the java side that it uses icon_status in the drawable folders but i cant seem to be able to change the image from AIR settings.
Hi woshikj,
Can you provide me solution for GCM data being null.
Many thanks.
Hello wongpv,
If you looked at the source code for the callback method that receives the GCM message, you'll be able to see this.
CharSequence tickerText = intent.getStringExtra("tickerText");
CharSequence contentTitle = intent.getStringExtra("contentTitle");
CharSequence contentText = intent.getStringExtra("contentText");
Which means that your GCM message has to follow the same name for each content such as tickerText for the text you see on your status bar when you receive it and contentTitle for the title of the notification.
Hope it helps! :)
Hi woshikj,
The solution that you provided work well. Many thanks. Please provide me solution display icon notification on status bar.
PushNotificationEvent.COMING_FROM_NOTIFICATION_EVENT, the e.parameters is null. Can you provide me solution for GCM e.parameters for PushNotificationEvent.COMING_FROM_NOTIFICATION_EVENT being null.
Android phone in onActivate ( Resume) mode, how I can received notification from PushNotificationEvent.COMING_FROM_NOTIFICATION_EVENT and the status bar will not display the notication?
Many thanks.
Hello wongpv,
I've been trying to figure that out as well but so far i've found no solution yet.
If someone knows, please reply too! :)
Thanks!
Hi guys, my phone never received the local notifications, can someone give me an example ?
For anyone still searching for a solution, Woshikj had the right direction, the json string needs a certain makeup to work, and here it is:
options = { data: { parameters: {param1: "these are parameters", param2: "even moar parameters"}, tickerText: "this goes in the top bar", contentTitle: "title of message", contentText: "text of message" }, collapse_key: "updated_score" }
the source that Woshikj is referring to is here: https://github.com/freshplanet/ANE-Push-Notification/blob/master/android/src/com/freshplanet/nativeExtensions/C2DMBroadcastReceiver.java
But how to add an icon to the notifications :-/
I've been trying to get notifications to work for a few days and currently, only local notifications work but the notification font size is too big. I can only see the title and half the height of the message.
Messages sent from GCM just returns me data = null.
Any way to solve this issue?
I'm testing on Samsung Galaxy S3 running Android 4.1.1
Is there a way to have an icon for the notification?
Thanks.