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

Two Wire Type Mini LCD digital voltmeter ammeter voltimetro DC 2.5-30V Red LED A
$1.88
Two Wire Type Mini LCD digital voltmeter ammeter voltimetro DC 2.5-30V Red LED A pictureAmprobe Chart Recording AC Volt Ammeter With Accs...
$17.0
Amprobe Chart Recording AC Volt Ammeter With Accs... pictureXD#3 AN8008 True-RMS Digital Multimeter 9999 Counts Square Wave Voltage Ammeter
$25.09
XD#3 AN8008 True-RMS Digital Multimeter 9999 Counts Square Wave Voltage Ammeter pictureWhite 100A 300V AC Digital Ammeter Volt Meter LCD Panel Voltmeter 110V 220V
$8.49
White 100A 300V AC Digital Ammeter Volt Meter LCD Panel Voltmeter 110V 220V pictureTisco Ford Allis Chalmer Ammeter Part No. A0NN10670A
$20.0
Tisco Ford Allis Chalmer Ammeter Part No. A0NN10670A picture






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