Unable to get the local-notification immediately without any delay when a message received from websocket
See original GitHub issueI am trying to push notification message from webserver to my mobile client using websocket. on my websocket onmessage received event i am showing up a local-notification using the plugin(“nativescript-local-notifications”) here is the code i used
LocalNotifications.schedule([{
id: 1,
title: 'New Message from websocket' ,
body: 'Test message',
ticker: 'The ticker',
ongoing: true, // makes the notification ongoing (Android only)
sound: "customsound-ios.wav", // falls back to the default sound on Android
at:new Date() //same behaviour when comment out this line
}]).then(
function() {
console.log("Notification scheduled");
},
function(error) {
console.log("scheduling error: " + error);
}
)
});
using the above code i am getting local-notification 5secs after the websocket onmessage received event. but if i use the same code inside the button tap event i am getting the local-notification immediately. any help or troubleshooting tips is highly appreciated.
Regards, Boobalakannan
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
delay websocket updates and show the message later on?
I use websockets and pusher api to tackle the live updates, this works perfectly when player is "online". But what if they are...
Read more >Duplicate iOS companion app notifications
I'm receiving duplicate notifications for some of my automations. ... can receive push notifications directly (when on your home network).
Read more >Scripting API: ConnectionConfig - Unity - Manual
If the server were to send an acknowledgement immediately after receiving each ... significant delaying of message delivering and can make game unplayable....
Read more >Local Notifications: iOS & Android - Ionic Framework
The Cordova Local Notifications Plugin allows you to display local notifications from your Ionic Framework application on iOS, Android, or Windows devices.
Read more >Open Client API - Pushover
Pushover now features a public client API for advanced users to write their ... message confirms that you are now able to receive...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks Nicklliev. it works well. after cloned the application deleted my previous version of the application from my device removed the node_modules, platforms and hooks folders rebuild and redeployed the application with run android
@BoobalakannanSubbaiyan the issue is not reproducible on our side when the
at
key is removed - here you can find a sample project used withnativescript-local-notifications
andnativescript-websockets
.