Stay organized with collections
Save and categorize content based on your preferences.
CellInfoListener
interface CellInfoListener
Interface for cell info listener.
Summary
Public methods |
abstract Unit |
Callback invoked when an observed cell info has changed or new cells have been added or removed 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.CellInfoListener\n\nAdded in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nCellInfoListener\n================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/telephony/TelephonyCallback.CellInfoListener \"View this page in Java\") \n\n```\ninterface CellInfoListener\n```\n\n|-----------------------------------------------------------|\n| [android.telephony.TelephonyCallback.CellInfoListener](#) |\n\nInterface for cell info listener.\n\nSummary\n-------\n\n| Public methods ||\n|---------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onCellInfoChanged](#onCellInfoChanged(kotlin.collections.MutableList))`(`cellInfo:` `[MutableList](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-list/index.html)\u003c[CellInfo](/reference/kotlin/android/telephony/CellInfo)!\u003e`)` Callback invoked when an observed cell info has changed or new cells have been added or removed on the registered subscription. |\n\nPublic methods\n--------------\n\n### onCellInfoChanged\n\nAdded in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onCellInfoChanged(cellInfo: MutableList\u003cCellInfo!\u003e): Unit\n```\n\nCallback invoked when an observed cell info has changed or new cells have been added or removed on the registered subscription. Note, the registration subscription ID s from [TelephonyManager](/reference/kotlin/android/telephony/TelephonyManager) object which registers TelephonyCallback by [TelephonyManager.registerTelephonyCallback(Executor, TelephonyCallback)](/reference/kotlin/android/telephony/TelephonyManager#registerTelephonyCallback(java.util.concurrent.Executor,%20android.telephony.TelephonyCallback)). If this TelephonyManager object was created with [TelephonyManager.createForSubscriptionId(int)](/reference/kotlin/android/telephony/TelephonyManager#createForSubscriptionId(kotlin.Int)), then the callback applies to the subscription ID. Otherwise, this callback applies to [SubscriptionManager.getDefaultSubscriptionId()](/reference/kotlin/android/telephony/SubscriptionManager#getDefaultSubscriptionId()). \nRequires [android.Manifest.permission#READ_PHONE_STATE](../Manifest.permission.html#READ_PHONE_STATE:kotlin.String) and [android.Manifest.permission#ACCESS_FINE_LOCATION](../Manifest.permission.html#ACCESS_FINE_LOCATION:kotlin.String)\n\n| Parameters ||\n|------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `cellInfo` | [MutableList](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-list/index.html)\\\u003c[CellInfo](/reference/kotlin/android/telephony/CellInfo)!\\\u003e: is the list of currently visible cells. This value cannot be `null`. |"]]