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

4 x Black Inkjet Cartridges Non-OEM Alternative For T1291
$11.45
4 x Black Inkjet Cartridges Non-OEM Alternative For T1291 pictureNew OEM Lightning to USB Cable Charger Data Cord for iPhone 5 5S 5C 6 6 Plus
$2.7
New OEM Lightning to USB Cable Charger Data Cord for iPhone 5 5S 5C 6 6 Plus  pictureOEM Genuine Original for Apple iPhone 5s 6s 6+ Lightning USB Data Cable Charger
$2.7
OEM Genuine Original for Apple iPhone 5s 6s 6+ Lightning USB Data Cable Charger  pictureOEM Genuine Original for Appl iPhone 5s 6s 6+ Lightning USB Data Cable Charger.
$2.7
OEM Genuine Original for Appl iPhone 5s 6s 6+ Lightning USB Data Cable Charger.  pictureOEM Original lightning USB Charger Cable for Apple iPhone 7 6S 6+ 6 + plus 5s 5
$2.7
OEM Original lightning USB Charger Cable for Apple iPhone 7 6S 6+ 6 + plus 5s 5  picture






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