How to make such an app that listen for Web Socket message in Background

40 views
Skip to first unread message

ansari_abdullah

unread,
Apr 28, 2017, 5:28:09 AM4/28/17
to DroidScript
Hello, I'm building such an app that listen for Web Socket message in Background although the app has been removed from recent apps.
Anyone have idea for this ?
I'm receiving web socket message by using this code: 
   
var ws= new WebSocket('ws://path/to/server');
ws
.onmessage= function(data){
    app
.ShowPopup(data.data);
}
How should add this to background service ?
Reply all
Reply to author
Forward
0 new messages