BlackBerry Forums Support Community
              

Closed Thread
 
LinkBack Thread Tools
Old 01-28-2009, 11:09 AM   #1 (permalink)
Knows Where the Search Button Is
 
Join Date: Aug 2008
Location: Scotland
Model: None!
PIN: N/A
Carrier: Vodafone
Posts: 31
Post Thanks: 0
Thanked 0 Times in 0 Posts
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 (permalink)
Talking BlackBerry Encyclopedia
 
Smiley8's Avatar
 
Join Date: May 2008
Location: Calgary, AB
Model: Torch
Carrier: Fido
Posts: 226
Post Thanks: 0
Thanked 0 Times in 0 Posts
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 (permalink)
Thumbs Must Hurt
 
Join Date: May 2007
Location: berlin, germany
Model: 8310
PIN: N/A
Carrier: vodafone
Posts: 163
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

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


Thread Tools

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Genuine OEM 0H983F Dell Optiplex 960 SSF Power Button Board Card P/N: H983F
$7.99
Genuine OEM 0H983F Dell Optiplex 960 SSF Power Button Board Card P/N: H983F pictureNEW GENUINE OEM DELL B126x BLACK Toner DRYXV. Sealed box. Slight box damage.
$55.0
NEW GENUINE OEM DELL B126x BLACK Toner DRYXV. Sealed box. Slight box damage.  pictureDell CW796 Cover Top 1720 OEM Genuine NIB OEM
$28.45
Dell CW796 Cover Top 1720 OEM Genuine NIB OEM  pictureNEW VESA ADAPTER PLATE FOR DELL E-SERIES MONITORS - OEM
$7.99
NEW VESA ADAPTER PLATE FOR DELL E-SERIES MONITORS - OEM pictureOEM BULB with Housing for DELL 4320 Projector with 180 Day Warranty
$179.0
OEM BULB with Housing for DELL 4320 Projector with 180 Day Warranty picture






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