PhoneNumberUtils.Compare Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| Compare(String, String) |
Compare phone numbers a and b, return true if they're identical enough for caller ID purposes. |
| Compare(Context, String, String) |
Compare phone numbers a and b, and return true if they're identical enough for caller ID purposes. |
Compare(String, String)
Compare phone numbers a and b, return true if they're identical enough for caller ID purposes.
[Android.Runtime.Register("compare", "(Ljava/lang/String;Ljava/lang/String;)Z", "")]
public static bool Compare(string? a, string? b);
[<Android.Runtime.Register("compare", "(Ljava/lang/String;Ljava/lang/String;)Z", "")>]
static member Compare : string * string -> bool
Parameters
- a
- String
The first phone number to compare.
- b
- String
The second phone number to compare.
Returns
true if the comparison treats the inputs as the same number for caller identification; otherwise, false.
- Attributes
Remarks
Compare phone numbers a and b, return true if they're identical enough for caller ID purposes.
This member is deprecated. use #areSamePhoneNumber(String, String, String) instead
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
Compare(Context, String, String)
Compare phone numbers a and b, and return true if they're identical enough for caller ID purposes.
[Android.Runtime.Register("compare", "(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)Z", "")]
public static bool Compare(Android.Content.Context? context, string? a, string? b);
[<Android.Runtime.Register("compare", "(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)Z", "")>]
static member Compare : Android.Content.Context * string * string -> bool
Parameters
- context
- Context
The context whose resources select strict or loose number comparison.
- a
- String
The first phone number to compare.
- b
- String
The second phone number to compare.
Returns
true if the comparison treats the inputs as the same number for caller identification; otherwise, false.
- Attributes
Remarks
Compare phone numbers a and b, and return true if they're identical enough for caller ID purposes. Checks a resource to determine whether to use a strict or loose comparison algorithm.
This member is deprecated. use #areSamePhoneNumber(String, String, String) instead
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.