Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Contributor
paulpv
Posts: 14
Registered: ‎08-22-2008
My Device: Not Specified

Power hungry audio/voip app runs less than half-day out of holster...but *days* running in holster?

I've been working on a very power hungry Radio-Over-IP (RoIP) BB app for nearly a year now:

http://twistpair.com/index/wave-5-0

 

We are well aware that the app can burn through a full battery in less than 12 hours.

We joke that it makes for a good pocket warmer in cold climates! :smileyhappy:

 

The battery drains regardless of any audio activity, mostly we think because of the current design that holds open a constant TCP socket (we are working on that).

 

One of my co-workers mentioned to me the other day that his BB runs for *days* w/ the app running.

At first we thought he was crazy, but then we found out that he holsters his BB most of the time.

 

Last night we ran an experiment and started the app and holstered the BB and let it sit over night.

While in the holster the app receives and plays audio activity as we want.

This morning the device was still at nearly 100% battery!

Better yet, it was still able to receive and play the audio activity.

 

That's amazing! I could swear I used to manually standby my phone and would still only get ~12 hours of runtime. Why does standby mode in the holster make such a big difference?

 

*Requiring* our customers to use a holster to reasonable battery life seems a little silly, and surely many customers would forget to holster their devices and still complain about battery life.

 

Is there a software API that can be called (ex: after a certain period of idle time) to induce the holstered standby mode?

 

Windows Mobile devices have excessively granular power management APIs that can be used to put the device's peripherals in various off/low/full/etc power states:

http://msdn.microsoft.com/en-us/library/aa923906.aspx

http://msdn.microsoft.com/en-us/library/aa929251.aspx

http://www.codeproject.com/KB/windows/WiMoPower1.aspx

Is there a similar concept of granular levels of power management in the BB?

 

Thanks!

 

Pv

Please use plain text.
Developer
rcmaniac25
Posts: 1,805
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.2.1.3253, Z10 (STL100-3)-10.3.1.634 Dev OS, Z30 (STA100-5)-10.3.1.634 Dev OS, Passport (SQW100-1)-10.3.0.1418, PlayBook (16GB)-2.1.0.1917

Re: Power hungry audio/voip app runs less than half-day out of holster...but *days* running in holster?

Unfortunately no, you can get alerted to it being holstered.

 

The "keep TCP socket open" would be the cause. I can watch multiple videos, listen to music, play games, etc. and still have 90+ % of my battery life but the instant I go to make a phone call, txt, email, or run an app with networking capability the life can drop by as much as 10%.

 

It would be interesting to hear what could cause the battery to stay charged (I'm making the assumption that the holster doesn't charge the battery) because it could be a viable way to keep some apps from killing battery life.

---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.
Please use plain text.
Developer
peter_strange
Posts: 19,607
Registered: ‎07-14-2008
My Device: Not Specified

Re: Power hungry audio/voip app runs less than half-day out of holster...but *days* running in holster?

Nothing to do with the screen being on?  Just a thought.

Please use plain text.
Contributor
paulpv
Posts: 14
Registered: ‎08-22-2008
My Device: Not Specified

Re: Power hungry audio/voip app runs less than half-day out of holster...but *days* running in holster?

Thanks for the replies.

 

The holster doesn't charge the device, it is just the leather pouch that came w/ the device w/ the magnet embedded that puts the device in to a sleep mode when inserted.

 

When the device is put in the holster it actively runs for days (going on nearly 72 hours) with the TCP socket open, connected, and maintaining a PING every 30 seconds.

When the device is not holstered, but locked with the screen off, the same app dies in 12 hours.

 

No, I don't think the screen is the issue because the screen *looks* to be turned off even when unholstered but locked.

It is possible there is a huge power difference between the screen being dimmed in locked mode and perhaps being completely powered down when holstered...that's just a theory.

 

I also don't buy that it is the TCP socket being open, because the device has proven that in holster mode that it can hold a TCP socket open for 72+ hours.

 

My company is an alliance partner w/ RIM, so we are also pinging the big-dogs there asking for some more insight in to our recent battery life observation.

 

Pv

Please use plain text.
Developer
Aviator168
Posts: 709
Registered: ‎09-10-2009
My Device: 8520, 8900, 9000, 9300, 9650, 9700, 9780, 9800, 9810, 9900, 9930

Re: Power hungry audio/voip app runs less than half-day out of holster...but *days* running in holster?

Over the air (3G) is a battery kill. My VoIP can run on days on standby over wifi. The VoIP protocal needs to be changed a bit for true mobile and it is not difficult.

Please use plain text.
New Contributor
suprnova74
Posts: 6
Registered: ‎11-06-2010
My Device: 9700

Re: Power hungry audio/voip app runs less than half-day out of holster...but *days* running in holster?

I have an app that maintains a tcp connection. I've found that reducing the send/receive poll time to 5 to 10 seconds dramatically increased battery life, whether holstered or not. Before it would poll for anything to receive every second and that constant check drained the battery extremely fast(on EDGE, down to 25% in 15ish hours, 3G in 8ish). Now 3G will last at least 24 hours.
Additionally, I've found constantly closing and reestablishing a connection is MUCH more power intensive than just leaving the connection open but idle.
Please use plain text.