0

I'm developing something like a stopwatch, so I have to turn off that below 20% battery alert view somehow during a time measuring session (I will inform the user about battery percentage elsehow).

I just couldn't google for any answer.

Geri Borbás
  • 15,810
  • 18
  • 109
  • 172

1 Answers1

3

You can't do this using the public iPhone SDK.

Mike
  • 23,892
  • 18
  • 70
  • 90
  • Whoa. Then what is the best way to ask for the battery percentage? UIDevice class? Is the system alert launched on an actual 20% (Maybe I can inform the user on 30% before starting a time measuring session)? – Geri Borbás Jan 03 '10 at 01:59
  • To get the battery life, you can use `[[UIDevice currentDevice] batteryLevel]`, which will give you a float between 0.0 and 1.0. http://stackoverflow.com/questions/1469549/iphone-calculating-battery-life explains how to get notifications about battery life. – Mike Jan 03 '10 at 02:21