Share via


HealthConnectManager.InsertRecords Method

Definition

Inserts records into the HealthConnect database.

[Android.Runtime.Register("insertRecords", "(Ljava/util/List;Ljava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V", "GetInsertRecords_Ljava_util_List_Ljava_util_concurrent_Executor_Landroid_os_OutcomeReceiver_Handler", ApiSince=34)]
public virtual void InsertRecords (System.Collections.Generic.IList<Android.Health.Connect.DataTypes.Record> records, Java.Util.Concurrent.IExecutor executor, Android.OS.IOutcomeReceiver callback);
[<Android.Runtime.Register("insertRecords", "(Ljava/util/List;Ljava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V", "GetInsertRecords_Ljava_util_List_Ljava_util_concurrent_Executor_Landroid_os_OutcomeReceiver_Handler", ApiSince=34)>]
abstract member InsertRecords : System.Collections.Generic.IList<Android.Health.Connect.DataTypes.Record> * Java.Util.Concurrent.IExecutor * Android.OS.IOutcomeReceiver -> unit
override this.InsertRecords : System.Collections.Generic.IList<Android.Health.Connect.DataTypes.Record> * Java.Util.Concurrent.IExecutor * Android.OS.IOutcomeReceiver -> unit

Parameters

records
IList<Record>

list of records to be inserted.

executor
IExecutor

Executor on which to invoke the callback.

callback
IOutcomeReceiver

Callback to receive result of performing this operation.

Attributes

Remarks

Inserts records into the HealthConnect database. The records returned in InsertRecordsResponse contains the unique IDs of the input records. The values are in same order as records. In case of an error or a permission failure the HealthConnect service, OutcomeReceiver#onError will be invoked with a HealthConnectException.

Java documentation for android.health.connect.HealthConnectManager.insertRecords(java.util.List<android.health.connect.datatypes.Record>, java.util.concurrent.Executor, android.os.OutcomeReceiver<android.health.connect.InsertRecordsResponse, android.health.connect.HealthConnectException>).

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