TelephonyManager.IsEmergencyNumber(String) 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.
Identifies if the supplied phone number is an emergency number that matches a known emergency number based on current locale, SIM card(s), Android database, modem, network, or defaults.
[Android.Runtime.Register("isEmergencyNumber", "(Ljava/lang/String;)Z", "GetIsEmergencyNumber_Ljava_lang_String_Handler", ApiSince=29)]
public virtual bool IsEmergencyNumber (string number);
[<Android.Runtime.Register("isEmergencyNumber", "(Ljava/lang/String;)Z", "GetIsEmergencyNumber_Ljava_lang_String_Handler", ApiSince=29)>]
abstract member IsEmergencyNumber : string -> bool
override this.IsEmergencyNumber : string -> bool
Parameters
- number
- String
- the number to look up
Returns
true
if the given number is an emergency number based on current locale,
SIM card(s), Android database, modem, network or defaults; false
otherwise.
- Attributes
Remarks
Identifies if the supplied phone number is an emergency number that matches a known emergency number based on current locale, SIM card(s), Android database, modem, network, or defaults.
This method assumes that only dialable phone numbers are passed in; non-dialable numbers are not considered emergency numbers. A dialable phone number consists only of characters/digits identified by PhoneNumberUtils#isDialable(char)
.
The subscriptions which the identification would be based on, are all the active subscriptions, no matter which subscription could be used to create TelephonyManager.
Java documentation for android.telephony.TelephonyManager.isEmergencyNumber(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.