Language

HealthConnectManager.IsMatchmakingPossible Method

Definition

Checks if launching the intent returned by createMatchmakingIntent(MatchmakingRequest) with the same arguments will result in showing at least one matching data source.

[Android.Runtime.Register("isMatchmakingPossible", "(Landroid/health/connect/MatchmakingRequest;Ljava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V", "GetIsMatchmakingPossible_Landroid_health_connect_MatchmakingRequest_Ljava_util_concurrent_Executor_Landroid_os_OutcomeReceiver_Handler", ApiSince=37)]
public virtual void IsMatchmakingPossible(Android.Health.Connect.MatchmakingRequest request, Java.Util.Concurrent.IExecutor executor, Android.OS.IOutcomeReceiver callback);
[<Android.Runtime.Register("isMatchmakingPossible", "(Landroid/health/connect/MatchmakingRequest;Ljava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V", "GetIsMatchmakingPossible_Landroid_health_connect_MatchmakingRequest_Ljava_util_concurrent_Executor_Landroid_os_OutcomeReceiver_Handler", ApiSince=37)>]
abstract member IsMatchmakingPossible : Android.Health.Connect.MatchmakingRequest * Java.Util.Concurrent.IExecutor * Android.OS.IOutcomeReceiver -> unit
override this.IsMatchmakingPossible : Android.Health.Connect.MatchmakingRequest * Java.Util.Concurrent.IExecutor * Android.OS.IOutcomeReceiver -> unit

Parameters

request
MatchmakingRequest

A non-null MatchmakingRequest that contains a set of Record classes. See description at createMatchmakingIntent(MatchmakingRequest).

executor
IExecutor

A non-null Executor on which the callback will be invoked. 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

A non-null OutcomeReceiver to receive the result. The onResult method will be called with a boolean indicating if there are matching writing data sources to show. The onError method will be called if an error occurs.

Attributes

Remarks

Checks if launching the intent returned by createMatchmakingIntent(MatchmakingRequest) with the same arguments will result in showing at least one matching data source. Returns true if the flow launched by the Intent from createMatchmakingIntent(MatchmakingRequest) would display at least one matching data source, allowing the user to take action; Returns false if the launched flow would immediately return Activity.RESULT_CANCELED because there are no relevant data sources to show.

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

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