Stay organized with collections
Save and categorize content based on your preferences.
EmergencyNumberListListener
interface EmergencyNumberListListener
Interface for the current emergency number list listener.
Summary
Public methods |
abstract Unit |
Callback invoked when the current emergency number list has changed on the registered subscription.
|
Public methods
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# TelephonyCallback.EmergencyNumberListListener\n\nAdded in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nEmergencyNumberListListener\n===========================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/telephony/TelephonyCallback.EmergencyNumberListListener \"View this page in Java\") \n\n```\ninterface EmergencyNumberListListener\n```\n\n|----------------------------------------------------------------------|\n| [android.telephony.TelephonyCallback.EmergencyNumberListListener](#) |\n\nInterface for the current emergency number list listener.\n\nSummary\n-------\n\n| Public methods ||\n|---------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onEmergencyNumberListChanged](#onEmergencyNumberListChanged(kotlin.collections.MutableMap))`(`emergencyNumberList:` `[MutableMap](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-map/index.html)\u003c[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)!,` `[MutableList](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-list/index.html)\u003c[EmergencyNumber](/reference/kotlin/android/telephony/emergency/EmergencyNumber)!\u003e!\u003e`)` Callback invoked when the current emergency number list has changed on the registered subscription. |\n\nPublic methods\n--------------\n\n### onEmergencyNumberListChanged\n\nAdded in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onEmergencyNumberListChanged(emergencyNumberList: MutableMap\u003cInt!, MutableList\u003cEmergencyNumber!\u003e!\u003e): Unit\n```\n\nCallback invoked when the current emergency number list has changed on the registered subscription.\n\nNote, the registered subscription is associated with [TelephonyManager](/reference/kotlin/android/telephony/TelephonyManager) object on which [TelephonyManager.registerTelephonyCallback(Executor, TelephonyCallback)](/reference/kotlin/android/telephony/TelephonyManager#registerTelephonyCallback(java.util.concurrent.Executor,%20android.telephony.TelephonyCallback)) was called. If this TelephonyManager object was created with [TelephonyManager.createForSubscriptionId(int)](/reference/kotlin/android/telephony/TelephonyManager#createForSubscriptionId(kotlin.Int)), then the callback applies to the given subscription ID. Otherwise, this callback applies to [SubscriptionManager.getDefaultSubscriptionId()](/reference/kotlin/android/telephony/SubscriptionManager#getDefaultSubscriptionId()). The calling app should have carrier privileges (see [TelephonyManager.hasCarrierPrivileges](/reference/kotlin/android/telephony/TelephonyManager#hasCarrierPrivileges())) if it does not have the [android.Manifest.permission#READ_PHONE_STATE](../Manifest.permission.html#READ_PHONE_STATE:kotlin.String). \nRequires [android.Manifest.permission#READ_PHONE_STATE](../Manifest.permission.html#READ_PHONE_STATE:kotlin.String)\n\n| Parameters ||\n|-----------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `emergencyNumberList` | [MutableMap](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-map/index.html)\\\u003c[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)!, [MutableList](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-list/index.html)\\\u003c[EmergencyNumber](/reference/kotlin/android/telephony/emergency/EmergencyNumber)!\\\u003e!\\\u003e: Map associating all active subscriptions on the device with the list of emergency numbers originating from that subscription. If there are no active subscriptions, the map will contain a single entry with [SubscriptionManager.INVALID_SUBSCRIPTION_ID](/reference/kotlin/android/telephony/SubscriptionManager#INVALID_SUBSCRIPTION_ID:kotlin.Int) as the key and a list of emergency numbers as the value. If no emergency number information is available, the value will be empty. This value cannot be `null`. |"]]