共用方式為


SystemHealthManager.GetPowerMonitorReadings Method

Definition

Asynchronously retrieves the accumulated power consumption reported by the specified power monitors.

[Android.Runtime.Register("getPowerMonitorReadings", "(Ljava/util/List;Ljava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V", "GetGetPowerMonitorReadings_Ljava_util_List_Ljava_util_concurrent_Executor_Landroid_os_OutcomeReceiver_Handler", ApiSince=35)]
public virtual void GetPowerMonitorReadings (System.Collections.Generic.IList<Android.OS.PowerMonitor> powerMonitors, Java.Util.Concurrent.IExecutor? executor, Android.OS.IOutcomeReceiver onResult);
[<Android.Runtime.Register("getPowerMonitorReadings", "(Ljava/util/List;Ljava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V", "GetGetPowerMonitorReadings_Ljava_util_List_Ljava_util_concurrent_Executor_Landroid_os_OutcomeReceiver_Handler", ApiSince=35)>]
abstract member GetPowerMonitorReadings : System.Collections.Generic.IList<Android.OS.PowerMonitor> * Java.Util.Concurrent.IExecutor * Android.OS.IOutcomeReceiver -> unit
override this.GetPowerMonitorReadings : System.Collections.Generic.IList<Android.OS.PowerMonitor> * Java.Util.Concurrent.IExecutor * Android.OS.IOutcomeReceiver -> unit

Parameters

powerMonitors
IList<PowerMonitor>

power monitors to be retrieved.

executor
IExecutor

optional Executor to deliver the callbacks. If not supplied, the callback may be invoked on an arbitrary thread.

onResult
IOutcomeReceiver

callback for the result

Attributes

Remarks

Asynchronously retrieves the accumulated power consumption reported by the specified power monitors.

Java documentation for android.os.health.SystemHealthManager.getPowerMonitorReadings(java.util.List<android.os.PowerMonitor>, java.util.concurrent.Executor, android.os.OutcomeReceiver<android.os.PowerMonitorReadings, java.lang.RuntimeException>).

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