Sdílet prostřednictvím


TelephonyManager.CellLocation Property

Definition

Returns the current location of the device.

public virtual Android.Telephony.CellLocation? CellLocation { [Android.Runtime.Register("getCellLocation", "()Landroid/telephony/CellLocation;", "GetGetCellLocationHandler")] [Android.Runtime.RequiresPermission("android.permission.ACCESS_FINE_LOCATION")] get; }
[<get: Android.Runtime.Register("getCellLocation", "()Landroid/telephony/CellLocation;", "GetGetCellLocationHandler")>]
[<get: Android.Runtime.RequiresPermission("android.permission.ACCESS_FINE_LOCATION")>]
member this.CellLocation : Android.Telephony.CellLocation

Property Value

Current location of the device or null if not available.

Attributes

Remarks

Returns the current location of the device.

If there is only one radio in the device and that radio has an LTE connection, this method will return null. The implementation must not to try add LTE identifiers into the existing cdma/gsm classes.

This member is deprecated. use #getAllCellInfo instead, which returns a superset of this API.

Java documentation for android.telephony.TelephonyManager.getCellLocation().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to