CellLocation
abstract classCellLocation
kotlin.Any | |
↳ | android.telephony.CellLocation |
Abstract class that represents the location of the device. {@more}
Summary
Public constructors | |
---|---|
Public methods | |
---|---|
open static CellLocation! |
getEmpty() Return a new CellLocation object representing an unknown location, or null for unknown/none phone radio types. |
open static Unit |
Request an updated CellLocation for callers targeting SDK 30 or older. |
Public constructors
CellLocation
CellLocation()
Public methods
getEmpty
open static fungetEmpty(): CellLocation!
Deprecated: Deprecated in Java.
Return a new CellLocation object representing an unknown location, or null for unknown/none phone radio types.
requestLocationUpdate
open static funrequestLocationUpdate(): Unit
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 android.Manifest.permission#ACCESS_FINE_LOCATION
.
This method is a no-op for callers that target SDK level 28 or below and lack android.Manifest.permission#ACCESS_COARSE_LOCATION
.