Request an updated CellLocation for callers targeting SDK 30 or older. Whenever Android is aware of location changes, a callback will automatically be sent to all registrants of PhoneStateListener.LISTEN_CELL_LOCATION. This API requests an additional location update for cases where power saving might cause location updates to be missed.
This method is a no-op for callers targeting SDK level 31 or greater.
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,["# CellLocation\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nDeprecated in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nCellLocation\n============\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/telephony/CellLocation \"View this page in Java\") \n\n```\nabstract class CellLocation\n```\n\n|---|-------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.telephony.CellLocation](#) |\n\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Known Direct Subclasses [CdmaCellLocation](/reference/kotlin/android/telephony/cdma/CdmaCellLocation), [GsmCellLocation](/reference/kotlin/android/telephony/gsm/GsmCellLocation) |-------------------------------------------------------------------------------|-----------------------------------------------| | [CdmaCellLocation](/reference/kotlin/android/telephony/cdma/CdmaCellLocation) | Represents the cell location on a CDMA phone. | | [GsmCellLocation](/reference/kotlin/android/telephony/gsm/GsmCellLocation) | Represents the cell location on a GSM phone. | |\n\n*** ** * ** ***\n\n| **This class was deprecated in API level 31.**\n|\n| use [CellIdentity](/reference/kotlin/android/telephony/CellIdentity).\n\nAbstract class that represents the location of the device. {@more}\n\nSummary\n-------\n\n| Public constructors ||\n|--------------------------------------------|---|\n| [CellLocation](#CellLocation())`()` \u003cbr /\u003e |\n\n| Public methods ||\n|------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------|\n| open static [CellLocation](#)! | [getEmpty](#getEmpty())`()` Return a new CellLocation object representing an unknown location, or null for unknown/none phone radio types. |\n| open static [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [requestLocationUpdate](#requestLocationUpdate())`()` Request an updated CellLocation for callers targeting SDK 30 or older. |\n\nPublic constructors\n-------------------\n\n### CellLocation\n\n```\nCellLocation()\n```\n\nPublic methods\n--------------\n\n### getEmpty\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen static fun getEmpty(): CellLocation!\n```\n\n**Deprecated:** *Deprecated in Java.*\n\nReturn a new CellLocation object representing an unknown location, or null for unknown/none phone radio types. \n\n### requestLocationUpdate\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen static fun requestLocationUpdate(): Unit\n```\n\n**Deprecated:** *use [TelephonyManager.requestCellInfoUpdate](/reference/kotlin/android/telephony/TelephonyManager#requestCellInfoUpdate(java.util.concurrent.Executor,%20android.telephony.TelephonyManager.CellInfoCallback)).*\n\nRequest an updated CellLocation for callers targeting SDK 30 or older. Whenever Android is aware of location changes, a callback will automatically be sent to all registrants of [PhoneStateListener.LISTEN_CELL_LOCATION](/reference/kotlin/android/telephony/PhoneStateListener#LISTEN_CELL_LOCATION:kotlin.Int). This API requests an additional location update for cases where power saving might cause location updates to be missed.\n\nThis method is a no-op for callers targeting SDK level 31 or greater.\n\nThis method is a no-op for callers that target SDK level 29 or 30 and lack [android.Manifest.permission#ACCESS_FINE_LOCATION](../Manifest.permission.html#ACCESS_FINE_LOCATION:kotlin.String).\n\nThis method is a no-op for callers that target SDK level 28 or below and lack [android.Manifest.permission#ACCESS_COARSE_LOCATION](../Manifest.permission.html#ACCESS_COARSE_LOCATION:kotlin.String)."]]