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:
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.