how to use socket.io with background service on an

2019-08-03 22:46发布

I use gottox/socket.io-java-client on android chat app.And Now I want to use socket.io as a background service.In chat app If a new message (when chat app is closed),send a notification like "new message on chat app-click here if you want to see. How can I do that? I did a chat app with node.js,gottox on android.But I need this app work as a background service on phone.Do you have any plugins or examples?

1条回答
做自己的国王
2楼-- · 2019-08-03 23:28

A service or any other Android component can be closed by the operating system. The solution is to use Android notifications to wake up any component.

查看更多
登录 后发表回答