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


1PC USED A54MA55B BC186A413G52 Mitsubishi A500/F540 Series 55KW Drive Board #CZ picture

1PC USED A54MA55B BC186A413G52 Mitsubishi A500/F540 Series 55KW Drive Board #CZ

$317.00



Mitsubishi FR-A540-0.75K-NA AC DRIVE INVERTER 1 HP 380-480 VAC 50/60 HZ 4.1 AMP  picture

Mitsubishi FR-A540-0.75K-NA AC DRIVE INVERTER 1 HP 380-480 VAC 50/60 HZ 4.1 AMP

$649.99



1PC USED A54MA30B Mitsubishi F500/A500/A540 Series 30-37KW Drive Main Board #CZ picture

1PC USED A54MA30B Mitsubishi F500/A500/A540 Series 30-37KW Drive Main Board #CZ

$255.00



A54MA55B and BC186A413G52 frequency converters A500/F540 series 55KW drive board picture

A54MA55B and BC186A413G52 frequency converters A500/F540 series 55KW drive board

$350.00



Radiomatic Flo-One Beta Radio-Chromatography Detector A-500 Model A525 [E2FL] picture

Radiomatic Flo-One Beta Radio-Chromatography Detector A-500 Model A525 [E2FL]

$245.00



Mitsubishi A500 Variable Freq. Drive VFD AC Inverter 480V 3 PH 6.7A 3 HP Max picture

Mitsubishi A500 Variable Freq. Drive VFD AC Inverter 480V 3 PH 6.7A 3 HP Max

$299.99







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