Stay organized with collections
Save and categorize content based on your preferences.
TelephonyCallback.CarrierNetworkListener
public
static
interface
TelephonyCallback.CarrierNetworkListener
android.telephony.TelephonyCallback.CarrierNetworkListener
|
Interface for carrier network listener.
Summary
Public methods |
abstract
void
|
onCarrierNetworkChange(boolean active)
Callback invoked when telephony has received notice from a carrier
app that a network action that could result in connectivity loss
has been requested by an app using
CarrierService.notifyCarrierNetworkChange(boolean)
This is optional and is only used to allow the system to provide alternative UI while
telephony is performing an action that may result in intentional, temporary network
lack of connectivity.
|
Public methods
onCarrierNetworkChange
public abstract void onCarrierNetworkChange (boolean active)
Callback invoked when telephony has received notice from a carrier
app that a network action that could result in connectivity loss
has been requested by an app using
CarrierService.notifyCarrierNetworkChange(boolean)
This is optional and is only used to allow the system to provide alternative UI while
telephony is performing an action that may result in intentional, temporary network
lack of connectivity.
Note, this callback is pinned to the registered subscription and will be invoked when
the notifying carrier app has carrier privilege rule on the registered
subscription. TelephonyManager.hasCarrierPrivileges()
Parameters |
active |
boolean : If the carrier network change is or shortly will be active,
true indicate that showing alternative UI, false otherwise. |
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.CarrierNetworkListener\n\nAdded in [API level 31](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\nTelephonyCallback.CarrierNetworkListener\n========================================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/telephony/TelephonyCallback.CarrierNetworkListener \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\nstatic\n\n\ninterface\nTelephonyCallback.CarrierNetworkListener\n`\n\n\n`\n\n\n`\n\n|------------------------------------------------------------|\n| android.telephony.TelephonyCallback.CarrierNetworkListener |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nInterface for carrier network listener.\n\nSummary\n-------\n\n| ### Public methods ||\n|------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract void` | ` `[onCarrierNetworkChange](/reference/android/telephony/TelephonyCallback.CarrierNetworkListener#onCarrierNetworkChange(boolean))`(boolean active) ` Callback invoked when telephony has received notice from a carrier app that a network action that could result in connectivity loss has been requested by an app using [CarrierService.notifyCarrierNetworkChange(boolean)](/reference/android/service/carrier/CarrierService#notifyCarrierNetworkChange(boolean)) This is optional and is only used to allow the system to provide alternative UI while telephony is performing an action that may result in intentional, temporary network lack of connectivity. |\n\nPublic methods\n--------------\n\n### onCarrierNetworkChange\n\nAdded in [API level 31](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract void onCarrierNetworkChange (boolean active)\n```\n\nCallback invoked when telephony has received notice from a carrier\napp that a network action that could result in connectivity loss\nhas been requested by an app using\n[CarrierService.notifyCarrierNetworkChange(boolean)](/reference/android/service/carrier/CarrierService#notifyCarrierNetworkChange(boolean))\n\n\nThis is optional and is only used to allow the system to provide alternative UI while\ntelephony is performing an action that may result in intentional, temporary network\nlack of connectivity.\n\n\nNote, this callback is pinned to the registered subscription and will be invoked when\nthe notifying carrier app has carrier privilege rule on the registered\nsubscription. [TelephonyManager.hasCarrierPrivileges()](/reference/android/telephony/TelephonyManager#hasCarrierPrivileges())\n\n\u003cbr /\u003e\n\n| Parameters ||\n|----------|-----------------------------------------------------------------------------------------------------------------------------------------------|\n| `active` | `boolean`: If the carrier network change is or shortly will be active, `true` indicate that showing alternative UI, `false` otherwise. \u003cbr /\u003e |"]]