Why GroupMe kills the battery on your iPhone
fredandrandall.com
fredandrandall.com
One of the great things about the internet is that you can neglect considerations of the physical layer when you design your app.
One of the sad things about the mobile web is that you can't neglect considerations of the physical layer when you design your app.
Some things that seem like a great idea at first (eg lazy loading of lists as the user scrolls) can actually be detrimental and counter-productive when it comes to battery life.
Full load: large transmission to start off, but radio is idle after, if the list is long or user scrolls slowly radio might go to sleep after its programmed idle timer (8 seconds in GP's post)
Lazy load: keep on making transmissions periodically, either waking up the radio (and keeping it on for another 8 seconds) or outright never letting it sleep (if you lazy load every 7 seconds or less)
I suspect they are using a 3rd party push service and perhaps are trying to save a buck when the app is open. Not sure why they don't just keep a socket open?
edit: does this fall under "Local notifications"?
> Multitasking apps may only use background services for their intended purposes: VoIP, audio playback, location, task completion, local notifications, etc.
This could also be seen as violating this
> Apps that provide Push Notifications without using the Apple Push Notification (APN) API will be rejected
The only other explanation I can think of is that push notifications can take about 3-5 seconds to be delivered as they are routed through Apple's servers. If these are long-poll HTTP requests directly to GroupMe's servers, then the message would be delivered instantaneously.
I'd much rather have that short delay than have my phone die after using it. Right now I force kill GroupMe every time I leave it.
Verbs, another instant messaging app for the iPhone, does the same thing.