Udostępnij za pośrednictwem


BatteryManager.GetIntProperty(Int32) Method

Definition

Return the value of a battery property of integer type.

[Android.Runtime.Register("getIntProperty", "(I)I", "GetGetIntProperty_IHandler")]
public virtual int GetIntProperty (int id);
[<Android.Runtime.Register("getIntProperty", "(I)I", "GetGetIntProperty_IHandler")>]
abstract member GetIntProperty : int -> int
override this.GetIntProperty : int -> int

Parameters

id
Int32

identifier of the requested property

Returns

the property value. If the property is not supported or there is any other error, return (a) 0 if targetSdkVersion < VERSION_CODES.P or (b) Integer.MIN_VALUE if targetSdkVersion >= VERSION_CODES.P.

Attributes

Remarks

Return the value of a battery property of integer type.

Java documentation for android.os.BatteryManager.getIntProperty(int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to