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#Copypublic class PhonenumberUtils : IDisposable
- Inheritance
-
System.ObjectPhonenumberUtils
- Implements
-
System.IDisposable
Constructors
Declaration
C#Copypublic 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
Dispose()
Releases all the resources used by the PhonenumberUtils. It should be called after it has finished using the object.
Declaration
C#Copypublic void Dispose()
API Level: 3
Declaration
C#Copyprotected void Finalize()
API Level: 4
Declaration
C#Copypublic 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
GetLocationFromNumber(String, Region, Language)
Gets the location string from the number, region, and language.
Declaration
C#Copypublic 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
Declaration
C#Copypublic 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. |