GCM Notification arrives after 30seconds - google-cloud-messaging

I am using Google development sample codes to receive GCM notifications. I have spent nearly a week to find why I receive notifications after 25~30 seconds!!! did not find any answer.
I receive other apps' notifications (such as Viber, Line and WhatsApp) almost instantly!
It has the same slow behaviour in both emulator and my Samsung Galaxy S5.
I receive respond with message ID from Google GCM server instantly when I send a notifications so it means the problem is from Google GCM server to my app.
Any help would be much appreciated.

Related

Whatsapp cloud API message not delivering to IOS

I am working with whatsapp cloud api to send messages to clients, it is working fine with android but not working with IOS, are there any additional steps of setup for IOS ?
Normal messages with only text are delivered properly, but messages with images or documents are not being delivered.
I was trying to send message to IOS, message was uploaded from my side but didnt received on Iphone.

Firebase Cloud Messages never reach the device

I'm implementing FCM on Ionic 2 (AngularFire2 & Ionic Native FCM: cordova-plugin-fcm#2.1.2) currently testing iOS on an iOS 11 device.
FCM messages never arrive on the device. I get no errors from either the console sending messages or when sending messages via cURL.
I've gone through the troubleshooting steps from the Google dev advocate.
I've verified that a notification sent directly via Apple's APNS server gets delivered to the device when the app is in background, and the app when the app is in foreground. (I pulled the actual device token to test this.) i.e. APNS certificates are fine.
FCM initializes with no errors (watching the logs in Xcode) and FCM does retrieve a (seemingly) valid FCM token.
I've just ensured that all my npm modules are at the latest versions for firebase, angularFire2 and fcm.
I've verified that 'GoogleService-Info.plist' is in my resources folder
Bottom line: My APNS certificate is valid and seems to be correctly setup in the Firebase console. APNS direct messages work fine. FCM messages don't return an error, they just never get to the device. Seems to be getting lost in the FCM end.
Does anyone have any suggestions on how to further debug this?
thx.

Does tvOS support notification facility for chat applications?

I am building a tvOS app for the new Apple TV that needs to get notifications from a server every time that a chat message is sent. This notification is also to be displayed on the Apple TV. As much as I understand push notifications are not allowed with tvOS.
With this being said, are there any alternatives to what I need?
To clarify: This is a chat app that needs to display a notification to the user on the TV screen every time a message is received by the user. The app stays running indefinitely, while showing instant notifications. - I cannot use push notifications.
Please let me know if this makes sense, and thank you in advance for your help!
We recently built an app for apple TV that shows instant messages from different clients connected to our server. A good library that will answer your requirements is socket.io-client
Just google socket.io and learn how it works. Basically, you wait for a connection on your server and then you can send messages to your clients. On the client side (tvOS in your case) you specify what methods to run as response to the different event coming from the server.
Good luck.

What could cause ti.cloud to stop display Android Push Notifications (GCM) in status bar

I previously setup an Appcelerator Titanium project with push notifications (as per my Stack Overflow question How to configure Android Push Notifications (GCM) in Appcelerator Titanium Dashboard?) and for some months my Android app has been receiving the appropriate push notification from GCM, but I'm now receiving reports that this no longer works from end-users.
The flow usually goes like this...
Android app sends android push token to my Java server
Java server persists the Android push token
Java server sets up Amazon Web Service SNS endpoint for GCM and stores this endpoint for later use.
(some time passes)
Java server invokes Amazon Web Service SNS endpoint with a GCM payload
Amazon SNS passes message to Google GCM
GCM passes message to ti.cloud / ti.cloudpush
Phone displays push notification
The app does receive the push notification and I display an application dialog to show the contents of the message, but NO system-tray push notification is displayed, whereas I thought it was doing this in the past. No system sound is played either.
I can see that if the app is not running, then when the push notification is received the app is launched, but if the display isn't on (or locked) then the message will not be discovered for some time. I really need the native/system push notification to be in the tray.
Does anyone know why system / status notifications are not displayed? Should it be when using the ti.cloud / ti.cloudpush for Android?
Thanks
Rob.

should iOS Instant Messaging App server send APNS(new message) on foreground

I'm creating an instant messaging application. imagine something like skype or yahoo messenger.
Now our server only sends push notification(for new messages) on when the app is on background/multitasked/minimized. But sometimes the server fails to detect that our app is on background, so sometimes it doesn't send push notification even if the app is on background.
Now I'm thinking that our server should just always send push notifications to device even if it is in foreground(so all messages will have a push notif), but we won't show it(the apns) when in foreground. This way, the server won't need to detect if the app is on background or not.
Do you think it's okay, or there will be a sideeffect of always sending apns, you see, if you are chatting whole day on foreground, the client will receive apns but won't show it?
No problem to send lots of notification without reading it, if the payload is different.
You are not forced to show notifications with an alert when a notification is received in foreground.