0
我想知道如何获得Mha for iPhone/iPad电池的数据容量。 我会把它们放在我打算放在appstore上的应用程序中,然后我不能使用IOKit。 有谁知道我怎么能得到这些值?iPhone的电池容量值以mAH为单位
我想知道如何获得Mha for iPhone/iPad电池的数据容量。 我会把它们放在我打算放在appstore上的应用程序中,然后我不能使用IOKit。 有谁知道我怎么能得到这些值?iPhone的电池容量值以mAH为单位
batteryLevel
The battery charge level for the device.
@property (nonatomic, readonly) float batteryLevel
Discussion
Battery level ranges from 0.0 (fully discharged) to 1.0 (100% charged). Before accessing this property, ensure that battery monitoring is enabled.
If battery monitoring is not enabled, battery state is UIDeviceBatteryStateUnknown and the value of this property is –1.0.
Availability
Available in iOS 3.0 and later.
See Also
@property batteryState
@property batteryMonitoringEnabled
Declared In
UIDevice.h
的,那么你可以添加到您的应用程序的plist中,你会把所有的电池容量为每一个设备,读取设备模型和电池的percentange和满负荷,你可以得到以mAH为单位的实际值。
你的意思是毫安时(毫安) – 2012-01-30 09:54:46
是的:)......毫安 – AleMal 2012-01-30 09:58:16