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.

C#
Copy
public class PhonenumberUtils : IDisposable
Inheritance
System.Object
PhonenumberUtils
Implements
System.IDisposable

Constructors

View Source

PhonenumberUtils()

Creates a PhonenumberUtils.

Declaration
C#
Copy
public PhonenumberUtils()
Exceptions
Type Condition
System.InvalidOperationException

Thrown when the method failed due to an invalid operation.

System.NotSupportedException

Thrown when the feature is not supported.

API Level: 3
Feature: http://tizen.org/feature/network.telephony

Methods

View Source

Dispose()

Releases all the resources used by the PhonenumberUtils. It should be called after it has finished using the object.

Declaration
C#
Copy
public void Dispose()
API Level: 3
View Source

Finalize()

The destructor.

Declaration
C#
Copy
protected void Finalize()
API Level: 4
View Source

GetFormattedNumber(String, Region)

Gets the formatted number.

Declaration
C#
Copy
public string GetFormattedNumber(string number, Region region)
Parameters
Type Name Description
System.String number

The number.

Region region

The region of number.

Returns
Type Description
System.String

The formatted number string.

Exceptions
Type Condition
System.InvalidOperationException

Thrown when the method failed due to an invalid operation.

System.NotSupportedException

Thrown when the feature is not supported.

System.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 Source

GetLocationFromNumber(String, Region, Language)

Gets the location string from the number, region, and language.

Declaration
C#
Copy
public string GetLocationFromNumber(string number, Region region, Language language)
Parameters
Type Name Description
System.String number

The number.

Region region

The region of number.

Language language

The language of location.

Returns
Type Description
System.String

The location string.

Exceptions
Type Condition
System.InvalidOperationException

Thrown when the method failed due to an invalid operation.

System.NotSupportedException

Thrown when the feature is not supported.

System.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 Source

GetNormalizedNumber(String)

Gets the normalized number.

Declaration
C#
Copy
public string GetNormalizedNumber(string number)
Parameters
Type Name Description
System.String number

The number.

Returns
Type Description
System.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
System.InvalidOperationException

Thrown when the method failed due to an invalid operation.

System.NotSupportedException

Thrown when the feature is not supported.

System.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.

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/telephony
Feature: http://tizen.org/feature/network.telephony

Implements

System.IDisposable