I\'m using this function to get current battery level of device:
[[UIDevice currentDevice] setBatteryMonitoringEnabled:YES];
UIDevice *myDevice = [UIDevice c
The answers above are very good, but they are all in Obj-C, I have used these with other examples to do the same task on MonoTouch, so I am putting my code here in case anybody needs it:
try
{
UIDevice.CurrentDevice.BatteryMonitoringEnabled = true;
_Battery.Level = (int)(UIDevice.CurrentDevice.BatteryLevel * IOSBatteryLevelScalingFactor);
_Battery.State = UIDevice.CurrentDevice.BatteryState;
}
catch (Exception e)
{
ExceptionHandler.HandleException(e, "BatteryState.Update");
throw new BatteryUpdateException();
}
finally
{
UIDevice.CurrentDevice.BatteryMonitoringEnabled = false;
}
I also have a full post on my blog to give all the details in here