# CellLocation

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Deprecated in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Summary:[Ctors](https://developer.android.com/reference/android/telephony/CellLocation#pubctors)\|[Methods](https://developer.android.com/reference/android/telephony/CellLocation#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/telephony/CellLocation#inhmethods)  

# CellLocation

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/telephony/CellLocation "View this page in Kotlin")\|Java

`
public


abstract
class
CellLocation
`  
`

extends `[Object](https://developer.android.com/reference/java/lang/Object)`


``


`

|---|--------------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.telephony.CellLocation |

|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Known direct subclasses [CdmaCellLocation](https://developer.android.com/reference/android/telephony/cdma/CdmaCellLocation),[GsmCellLocation](https://developer.android.com/reference/android/telephony/gsm/GsmCellLocation) |-----------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------| | [CdmaCellLocation](https://developer.android.com/reference/android/telephony/cdma/CdmaCellLocation) | *This class was deprecated in API level 31. use[CellIdentity](https://developer.android.com/reference/android/telephony/CellIdentity).* | | [GsmCellLocation](https://developer.android.com/reference/android/telephony/gsm/GsmCellLocation)    | *This class was deprecated in API level 31. use[CellIdentity](https://developer.android.com/reference/android/telephony/CellIdentity).* | |

<br />

*** ** * ** ***

<br />

**This class was deprecated in API level 31.**   
use[CellIdentity](https://developer.android.com/reference/android/telephony/CellIdentity).

Abstract class that represents the location of the device.

<br />

## Summary

|                                             ### Public constructors                                              ||
|---------------------------------------------------------------------------------------------------------------|---|
| ` `[CellLocation](https://developer.android.com/reference/android/telephony/CellLocation#CellLocation())`() ` |

|                                                                                                                                                                                                                                         ### Public methods                                                                                                                                                                                                                                          ||
|--------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` static `[CellLocation](https://developer.android.com/reference/android/telephony/CellLocation) | ` `[getEmpty](https://developer.android.com/reference/android/telephony/CellLocation#getEmpty())`() ` Return a new CellLocation object representing an unknown location, or null for unknown/none phone radio types.                                                                                                                                                                              |
| ` static void`                                                                                   | ` `[requestLocationUpdate](https://developer.android.com/reference/android/telephony/CellLocation#requestLocationUpdate())`() ` *This method is deprecated. use[TelephonyManager.requestCellInfoUpdate](https://developer.android.com/reference/android/telephony/TelephonyManager#requestCellInfoUpdate(java.util.concurrent.Executor,%20android.telephony.TelephonyManager.CellInfoCallback)).* |

| ### Inherited methods |
|-----------------------|---|
| From class` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object)` ` |--------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object)          | ` `[clone](https://developer.android.com/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object.                                                                                                                                                      | | ` boolean`                                                                     | ` `[equals](https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` obj) ` Indicates whether some other object is "equal to" this one.                                           | | ` void`                                                                        | ` `[finalize](https://developer.android.com/reference/java/lang/Object#finalize())`() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.                                                          | | ` final `[Class](https://developer.android.com/reference/java/lang/Class)`<?>` | ` `[getClass](https://developer.android.com/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this`Object`.                                                                                                                                                | | ` int`                                                                         | ` `[hashCode](https://developer.android.com/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object.                                                                                                                                                 | | ` final void`                                                                  | ` `[notify](https://developer.android.com/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor.                                                                                                                            | | ` final void`                                                                  | ` `[notifyAll](https://developer.android.com/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor.                                                                                                                         | | ` `[String](https://developer.android.com/reference/java/lang/String)          | ` `[toString](https://developer.android.com/reference/java/lang/Object#toString())`() ` Returns a string representation of the object.                                                                                                                                            | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long,%20int))`(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed. | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long))`(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed.                   | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*.                                                                                             | ||

## Public constructors

### CellLocation

```
public CellLocation ()
```

<br />

<br />

## Public methods

### getEmpty

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static CellLocation getEmpty ()
```

Return a new CellLocation object representing an unknown location, or null for unknown/none phone radio types.

<br />

|                                            Returns                                             ||
|----------------------------------------------------------------------------------------|--------|
| [CellLocation](https://developer.android.com/reference/android/telephony/CellLocation) | <br /> |

### requestLocationUpdate

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static void requestLocationUpdate ()
```

<br />

**This method is deprecated.**   
use[TelephonyManager.requestCellInfoUpdate](https://developer.android.com/reference/android/telephony/TelephonyManager#requestCellInfoUpdate(java.util.concurrent.Executor,%20android.telephony.TelephonyManager.CellInfoCallback)).

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](https://developer.android.com/reference/android/telephony/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.

This method is a no-op for callers that target SDK level 29 or 30 and lack[Manifest.permission.ACCESS_FINE_LOCATION](https://developer.android.com/reference/android/Manifest.permission#ACCESS_FINE_LOCATION).

This method is a no-op for callers that target SDK level 28 or below and lack[Manifest.permission.ACCESS_COARSE_LOCATION](https://developer.android.com/reference/android/Manifest.permission#ACCESS_COARSE_LOCATION).

<br />