語言

TelephonyManager.CellLocation 屬性

定義

回傳裝置目前的位置。

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

屬性值

裝置目前位置,或若無法提供則為空。

屬性

備註

回傳裝置目前的位置。

如果裝置中只有一台無線電且該無線電有 LTE 連線,此方法會回傳 null。 實作中不得嘗試將 LTE 識別碼加入現有的 cdma/gsm 類別。

此會員已被棄用。 use #getAllCellInfo instead ,會回傳該 API 的超集。

Java 文件 android.telephony.TelephonyManager.getCellLocation()。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於