Stay organized with collections
Save and categorize content based on your preferences.
BarringInfoListener
interface BarringInfoListener
Interface for barring information listener.
Summary
Public methods |
abstract Unit |
Report updated barring information for the current camped/registered cell.
|
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.BarringInfoListener\n\nAdded in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nBarringInfoListener\n===================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/telephony/TelephonyCallback.BarringInfoListener \"View this page in Java\") \n\n```\ninterface BarringInfoListener\n```\n\n|--------------------------------------------------------------|\n| [android.telephony.TelephonyCallback.BarringInfoListener](#) |\n\nInterface for barring information listener.\n\nSummary\n-------\n\n| Public methods ||\n|---------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onBarringInfoChanged](#onBarringInfoChanged(android.telephony.BarringInfo))`(`barringInfo:` `[BarringInfo](/reference/kotlin/android/telephony/BarringInfo)`)` Report updated barring information for the current camped/registered cell. |\n\nPublic methods\n--------------\n\n### onBarringInfoChanged\n\nAdded in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onBarringInfoChanged(barringInfo: BarringInfo): Unit\n```\n\nReport updated barring information for the current camped/registered cell.\n\nBarring info is provided for all services applicable to the current camped/registered cell, for the registered PLMN and current access class/access category. 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_PRECISE_PHONE_STATE](../Manifest.permission.html#READ_PRECISE_PHONE_STATE:kotlin.String) and [android.Manifest.permission#ACCESS_FINE_LOCATION](../Manifest.permission.html#ACCESS_FINE_LOCATION:kotlin.String). If the calling app doesn't have [android.Manifest.permission#ACCESS_FINE_LOCATION](../Manifest.permission.html#ACCESS_FINE_LOCATION:kotlin.String), it will receive [BarringInfo](/reference/kotlin/android/telephony/BarringInfo) including [CellIdentity](/reference/kotlin/android/telephony/CellIdentity) without location-sensitive information included. \nRequires [android.Manifest.permission#READ_PRECISE_PHONE_STATE](../Manifest.permission.html#READ_PRECISE_PHONE_STATE:kotlin.String) and [android.Manifest.permission#ACCESS_FINE_LOCATION](../Manifest.permission.html#ACCESS_FINE_LOCATION:kotlin.String)\n\n| Parameters ||\n|---------------|------------------------------------------------------------------------------------------------------------------------------------|\n| `barringInfo` | [BarringInfo](/reference/kotlin/android/telephony/BarringInfo): for all services on the current cell. This value cannot be `null`. |\n\n**See Also**\n\n- [android.telephony.BarringInfo](/reference/kotlin/android/telephony/BarringInfo)"]]