Android - Create a background service to receive PubNub messages
问题 I am using PubNub API to get real time messages. I have implemented code to subscribe to my channel and receive ongoing messages. I just want these messages to receive in background even if my application is not open. I have learned about services and broadcast receiver in android but I am not understanding the how to use this with PubNub. Is there any proper way to achieve this? PubNub Subscribe Code public static final String GLOBAL_CHANNEL = "NAME_OF_MY_CHANNEL"; public void subscribe() {