{"action":"created","issue":{"url":"https://api.github.com/repos/EddyVerbruggen/nativescript-local-notifications/issues/78","repository_url":"https://api.github.com/repos/EddyVerbruggen/nativescript-local-notifications","labels_url":"https://api.github.com/repos/EddyVerbruggen/nativescript-local-notifications/issues/78/labels{/name}","comments_url":"https://api.github.com/repos/EddyVerbruggen/nativescript-local-notifications/issues/78/comments","events_url":"https://api.github.com/repos/EddyVerbruggen/nativescript-local-notifications/issues/78/events","html_url":"https://github.com/EddyVerbruggen/nativescript-local-notifications/issues/78","id":300170120,"number":78,"title":"Unable to get the local-notification immediately without any delay when a message received from websocket","user":{"login":"BoobalakannanSubbaiyan","id":36841984,"avatar_url":"https://avatars3.githubusercontent.com/u/36841984?v=4","gravatar_id":"","url":"https://api.github.com/users/BoobalakannanSubbaiyan","html_url":"https://github.com/BoobalakannanSubbaiyan","followers_url":"https://api.github.com/users/BoobalakannanSubbaiyan/followers","following_url":"https://api.github.com/users/BoobalakannanSubbaiyan/following{/other_user}","gists_url":"https://api.github.com/users/BoobalakannanSubbaiyan/gists{/gist_id}","starred_url":"https://api.github.com/users/BoobalakannanSubbaiyan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BoobalakannanSubbaiyan/subscriptions","organizations_url":"https://api.github.com/users/BoobalakannanSubbaiyan/orgs","repos_url":"https://api.github.com/users/BoobalakannanSubbaiyan/repos","events_url":"https://api.github.com/users/BoobalakannanSubbaiyan/events{/privacy}","received_events_url":"https://api.github.com/users/BoobalakannanSubbaiyan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-02-26T09:48:33Z","updated_at":"2018-02-26T12:58:37Z","closed_at":null,"author_association":"NONE","body":"  I am trying to push notification message from webserver to my mobile client using websocket.\r\non my websocket onmessage received event i am showing up a local-notification using the plugin(\"nativescript-local-notifications\")\r\nhere is the code i used\r\n \r\n ```\r\nLocalNotifications.schedule([{\r\n            id: 1,\r\n            title: 'New Message from websocket' ,\r\n            body: 'Test message',\r\n            ticker: 'The ticker',\r\n            ongoing: true, // makes the notification ongoing (Android only)\r\n            sound: \"customsound-ios.wav\", // falls back to the default sound on Android\r\n            at:new Date()  //same behaviour when comment out  this line\r\n          }]).then(\r\n              function() {\r\n                console.log(\"Notification scheduled\");\r\n              },\r\n              function(error) {\r\n                console.log(\"scheduling error: \" + error);\r\n              }\r\n          )\r\n        });\r\n```\r\n\t\t\r\nusing the above code i am getting local-notification 5secs after the websocket onmessage received event.\r\nbut if i use the same code inside the button tap event i am getting the local-notification immediately.\r\nany help or troubleshooting tips is highly appreciated.\r\n\r\nRegards,\r\nBoobalakannan "},"comment":{"url":"https://api.github.com/repos/EddyVerbruggen/nativescript-local-notifications/issues/comments/368494207","html_url":"https://github.com/EddyVerbruggen/nativescript-local-notifications/issues/78#issuecomment-368494207","issue_url":"https://api.github.com/repos/EddyVerbruggen/nativescript-local-notifications/issues/78","id":368494207,"user":{"login":"NickIliev","id":18008302,"avatar_url":"https://avatars2.githubusercontent.com/u/18008302?v=4","gravatar_id":"","url":"https://api.github.com/users/NickIliev","html_url":"https://github.com/NickIliev","followers_url":"https://api.github.com/users/NickIliev/followers","following_url":"https://api.github.com/users/NickIliev/following{/other_user}","gists_url":"https://api.github.com/users/NickIliev/gists{/gist_id}","starred_url":"https://api.github.com/users/NickIliev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NickIliev/subscriptions","organizations_url":"https://api.github.com/users/NickIliev/orgs","repos_url":"https://api.github.com/users/NickIliev/repos","events_url":"https://api.github.com/users/NickIliev/events{/privacy}","received_events_url":"https://api.github.com/users/NickIliev/received_events","type":"User","site_admin":false},"created_at":"2018-02-26T12:58:37Z","updated_at":"2018-02-26T12:58:37Z","author_association":"NONE","body":"@BoobalakannanSubbaiyan the issue is not reproducible on our side when the `at` key is removed - [here you can find a sample project](https://github.com/NickIliev/NS-Issues-2018/tree/master/others/t_1155151) used with `nativescript-local-notifications` and `nativescript-websockets`."}}
{"actor":{"display_login":"NickIliev"}}