Class PhonenumberUtils
Definition
- Namespace:
- Tizen.PhonenumberUtils
- Assembly:
- Tizen.PhonenumberUtils.dll
- API Level:
- 3
The PhonenumberUtils class provides the methods for parsing, formatting, and normalizing the phone numbers.
public class PhonenumberUtils : IDisposable
- Inheritance
-
PhonenumberUtils
- Implements
Constructors
View SourcePhonenumberUtils()
Creates a PhonenumberUtils.
Declaration
public PhonenumberUtils()
Exceptions
Type | Condition |
---|---|
InvalidOperationException | Thrown when the method failed due to an invalid operation. |
NotSupportedException | Thrown when the feature is not supported. |
API Level: 3
Feature: http://tizen.org/feature/network.telephony
Methods
View SourceDispose()
Releases all the resources used by the PhonenumberUtils. It should be called after it has finished using the object.
Declaration
public void Dispose()
API Level: 3
View SourceFinalize()
The destructor.
Declaration
protected void Finalize()
API Level: 4
View SourceGetFormattedNumber(String, Region)
Gets the formatted number.
Declaration
public string GetFormattedNumber(string number, Region region)
Parameters
Type | Name | Description |
---|---|---|
String | number | The number. |
Region | region | The region of number. |
Returns
Type | Description |
---|---|
String | The formatted number string. |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | Thrown when the method failed due to an invalid operation. |
NotSupportedException | Thrown when the feature is not supported. |
ArgumentException | Thrown when the input coordinates are invalid. |
OutOfMemoryException | Thrown when failed due to out of memory. |
API Level: 3
Feature: http://tizen.org/feature/network.telephony
View SourceGetLocationFromNumber(String, Region, Language)
Gets the location string from the number, region, and language.
Declaration
public string GetLocationFromNumber(string number, Region region, Language language)
Parameters
Type | Name | Description |
---|---|---|
String | number | The number. |
Region | region | The region of number. |
Language | language | The language of location. |
Returns
Type | Description |
---|---|
String | The location string. |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | Thrown when the method failed due to an invalid operation. |
NotSupportedException | Thrown when the feature is not supported. |
ArgumentException | Thrown when the input coordinates are invalid. |
OutOfMemoryException | Thrown when failed due to out of memory. |
API Level: 3
Feature: http://tizen.org/feature/network.telephony
View SourceGetNormalizedNumber(String)
Gets the normalized number.
Declaration
public string GetNormalizedNumber(string number)
Parameters
Type | Name | Description |
---|---|---|
String | number | The number. |
Returns
Type | Description |
---|---|
String | The normalized number. |
Remarks
Normalized number starts with plus('+') and country code, and excludes the separators such as dash or space. It is a format of the E.164 standard including the country code based on the current network.
Exceptions
Type | Condition |
---|---|
InvalidOperationException | Thrown when the method failed due to an invalid operation. |
NotSupportedException | Thrown when the feature is not supported. |
ArgumentException | Thrown when the input coordinates are invalid. |
OutOfMemoryException | Thrown when failed due to out of memory. |
UnauthorizedAccessException | Thrown when the application does not have proper privileges. |