Language

HealthConnectManager.GetCurrentDeviceDataSource Method

Definition

Retrieves the DeviceDataSource for the current device.

[Android.Runtime.Register("getCurrentDeviceDataSource", "(Ljava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V", "GetGetCurrentDeviceDataSource_Ljava_util_concurrent_Executor_Landroid_os_OutcomeReceiver_Handler", ApiSince=37)]
public virtual void GetCurrentDeviceDataSource(Java.Util.Concurrent.IExecutor executor, Android.OS.IOutcomeReceiver callback);
[<Android.Runtime.Register("getCurrentDeviceDataSource", "(Ljava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V", "GetGetCurrentDeviceDataSource_Ljava_util_concurrent_Executor_Landroid_os_OutcomeReceiver_Handler", ApiSince=37)>]
abstract member GetCurrentDeviceDataSource : Java.Util.Concurrent.IExecutor * Android.OS.IOutcomeReceiver -> unit
override this.GetCurrentDeviceDataSource : Java.Util.Concurrent.IExecutor * Android.OS.IOutcomeReceiver -> unit

Parameters

executor
IExecutor

Executor on which to invoke the callback. This value cannot be null. Callback and listener events are dispatched through this Executor, providing an easy way to control which thread is used. To dispatch events through the main thread of your application, you can use Context.getMainExecutor(). Otherwise, provide an Executor that dispatches to an appropriate thread.

callback
IOutcomeReceiver

Callback to receive result of performing this operation. This value cannot be null.

Attributes

Remarks

Retrieves the DeviceDataSource for the current device.

The caller must hold at least one Health Connect read permission in order to call this method.

Android reference for android.health.connect.HealthConnectManager.getCurrentDeviceDataSource.

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