CellLocation
public abstract class CellLocation
extends Object
| java.lang.Object | |
| ↳ | android.telephony.CellLocation |
This class was deprecated in API level 31.
use CellIdentity.
Abstract class that represents the location of the device.
Summary
Public constructors | |
|---|---|
CellLocation() | |
Public methods | |
|---|---|
static CellLocation | getEmpty() Return a new CellLocation object representing an unknown location, or null for unknown/none phone radio types. |
static void | requestLocationUpdate() This method is deprecated. use |
Inherited methods | |
|---|---|
Public constructors
CellLocation
public CellLocation ()
Public methods
getEmpty
public static CellLocation getEmpty ()
Return a new CellLocation object representing an unknown location, or null for unknown/none phone radio types.
| Returns | |
|---|---|
CellLocation | |
requestLocationUpdate
public static void requestLocationUpdate ()
This method is deprecated.
use TelephonyManager.requestCellInfoUpdate.
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.
This method is a no-op for callers that target SDK level 29 or 30 and lack 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.