BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 01-28-2009, 11:09 AM   #1
FerminRomeroDeTorres
Knows Where the Search Button Is
 
Join Date: Aug 2008
Location: Scotland
Model: None!
PIN: N/A
Carrier: Vodafone
Posts: 31
Default Detecting low battery

Please Login to Remove!

Hi,

My app connects to a web service but if the gprs is off it times out. I used RadioInfo.getState(); to see if radio on or off but I never seem to get RadioInfo.STATE_LOWBATT, i either gett STATE_OFF or STATE_ON.

The problem is if I have low battery the state is STATE_OFF so i prompt the user to turn it on and when i use Radio.activateWAFs(); it times out, i'm guessing because it is trying to turn the radio on but the battery is too low to have it turned on??

Any suggestions to get round this?

Thanks
Offline  
Old 01-29-2009, 04:40 AM   #2
Smiley8
Talking BlackBerry Encyclopedia
 
Smiley8's Avatar
 
Join Date: May 2008
Location: Calgary, AB
Model: Torch
Carrier: Fido
Posts: 226
Default

Quote:
Originally Posted by FerminRomeroDeTorres View Post
Hi,

My app connects to a web service but if the gprs is off it times out. I used RadioInfo.getState(); to see if radio on or off but I never seem to get RadioInfo.STATE_LOWBATT, i either gett STATE_OFF or STATE_ON.

The problem is if I have low battery the state is STATE_OFF so i prompt the user to turn it on and when i use Radio.activateWAFs(); it times out, i'm guessing because it is trying to turn the radio on but the battery is too low to have it turned on??

Any suggestions to get round this?

Thanks
try adding a system listener to listen to the battery level.
__________________
Visit our website www.toysoft.ca for Cool BlackBerry Apps.

Follow us @ http://twitter.com/toysoft
Offline  
Old 01-29-2009, 09:36 AM   #3
hibbert
Thumbs Must Hurt
 
Join Date: May 2007
Location: berlin, germany
Model: 8310
PIN: N/A
Carrier: vodafone
Posts: 163
Default

or just try DeviceInfo.getBatteryLevel()
__________________
My English is so bad, that makes me nobody so quickly after
Offline  
Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


6.3V 10V 16V 25V 35V 50V 100V 400V SMD Aluminum Electrolytic Capacitor 1-1000 UF picture

6.3V 10V 16V 25V 35V 50V 100V 400V SMD Aluminum Electrolytic Capacitor 1-1000 UF

$155.59



CBB61 250V  Capacitor 2 wires 1/2/3/3.5/4/5/6/7/8/9/10/12/15/18/20/24/25/30 UF picture

CBB61 250V Capacitor 2 wires 1/2/3/3.5/4/5/6/7/8/9/10/12/15/18/20/24/25/30 UF

$129.95



45/5 MFD ±5% Dual Run Capacitor 370 450 VAC CBB65 AC Motor HVAC 45+5 uF Fan 10pk picture

45/5 MFD ±5% Dual Run Capacitor 370 450 VAC CBB65 AC Motor HVAC 45+5 uF Fan 10pk

$85.99



5pc Radial Electrolytic Capacitor 250V 100V 50V 25V 16V 0.22uF-4700uF 10000uF picture

5pc Radial Electrolytic Capacitor 250V 100V 50V 25V 16V 0.22uF-4700uF 10000uF

$27.99



45/5uf MFD 370/440v dual run round Air Conditioner and furnace capacitor  picture

45/5uf MFD 370/440v dual run round Air Conditioner and furnace capacitor 

$14.97



CBB61 250V  Capacitor 2 wires 1/2/3/3.5/4/5/6/7/8/9/10/12/15/18/20/24/25/30 UF picture

CBB61 250V Capacitor 2 wires 1/2/3/3.5/4/5/6/7/8/9/10/12/15/18/20/24/25/30 UF

$58.88







Copyright © 2004-2016 BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.