We're writing a chat app and have got the Pubnub service running in the background, listening for messages and firing a Notification Intent on receipt. The problem is that we're using a partial wake lock when the phone is sleeping and that just kills the battery (app takes up >20% of battery).
Is there a less CPU intensive way of listening for messages? I've also tried looking around for code examples of Pubnub push notifications on Android, but haven't found any.
Thanks, Saswat
COMING SOON: GCM push notifications are in beta and will be release around the beginning of June.
But, that website's date states:
PubNub Support posted this on July 19, 2012 19:59
So to answer your question: At the moment, there is no less-CPU intensive way of listening for messages than using a wake-lock. in fact, PubNub specifically states that you should use a partial wake lock on that website linked above.
There is also no documentation on the Android PubNub github. They state there that PubNub is better than Google C2DM. Google C2DM was deprecated years ago now.