Language

Telephony.Threads.GetOrCreateThreadId Method

Definition

Overloads

Name Description
GetOrCreateThreadId(Context, ICollection<String>)

Given a set of recipients return its thread ID.

GetOrCreateThreadId(Context, String)

This is a single-recipient version of getOrCreateThreadId.

GetOrCreateThreadId(Context, ICollection<String>)

Given a set of recipients return its thread ID.

[Android.Runtime.Register("getOrCreateThreadId", "(Landroid/content/Context;Ljava/util/Set;)J", "", ApiSince=23)]
public static long GetOrCreateThreadId(Android.Content.Context? context, System.Collections.Generic.ICollection<string>? recipients);
[<Android.Runtime.Register("getOrCreateThreadId", "(Landroid/content/Context;Ljava/util/Set;)J", "", ApiSince=23)>]
static member GetOrCreateThreadId : Android.Content.Context * System.Collections.Generic.ICollection<string> -> int64

Parameters

context
Context

The context used to query the messaging provider for a thread ID.

recipients
ICollection<String>

The recipient addresses added to the thread-ID query. Email addresses are reduced to their address portion before submission.

Returns

The thread ID read from the first provider result row. The method throws if no thread ID can be obtained.

Attributes

Remarks

Given a set of recipients return its thread ID.

If a thread exists containing the provided participants, return its thread ID. Otherwise, this will create a new thread containing the provided participants and return its ID.

Java documentation for android.provider.Telephony.Threads.getOrCreateThreadId(android.content.Context, java.util.Set<java.lang.String>).

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

GetOrCreateThreadId(Context, String)

This is a single-recipient version of getOrCreateThreadId.

[Android.Runtime.Register("getOrCreateThreadId", "(Landroid/content/Context;Ljava/lang/String;)J", "", ApiSince=23)]
public static long GetOrCreateThreadId(Android.Content.Context? context, string? recipient);
[<Android.Runtime.Register("getOrCreateThreadId", "(Landroid/content/Context;Ljava/lang/String;)J", "", ApiSince=23)>]
static member GetOrCreateThreadId : Android.Content.Context * string -> int64

Parameters

context
Context

the context object to use.

recipient
String

the recipient to send to.

Returns

The thread ID read from the first provider result row. The method throws if no thread ID can be obtained.

Attributes

Remarks

This is a single-recipient version of getOrCreateThreadId. It's convenient for use with SMS messages.

Java documentation for android.provider.Telephony.Threads.getOrCreateThreadId(android.content.Context, java.lang.String).

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