語言

Connection.QueryLocationForEmergency 方法

定義

查詢裝置位置以便撥打緊急電話。

[Android.Runtime.Register("queryLocationForEmergency", "(JLjava/lang/String;Ljava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V", "", ApiSince=34)]
public void QueryLocationForEmergency(long timeoutMillis, string provider, Java.Util.Concurrent.IExecutor executor, Android.OS.IOutcomeReceiver callback);
[<Android.Runtime.Register("queryLocationForEmergency", "(JLjava/lang/String;Ljava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V", "", ApiSince=34)>]
member this.QueryLocationForEmergency : int64 * string * Java.Util.Concurrent.IExecutor * Android.OS.IOutcomeReceiver -> unit

參數

timeoutMillis
Int64

long:以 millis 為單位,等待查詢回應(最大時間:5000,MIN:100)。

provider
String

String:位置提供者名稱,此值不能為空值。 來電者有責任選擇啟用的服務提供者。 來電者可以 android.location.LocationManager#getProviders(boolean) 選擇啟用的供應商之一並轉接。

executor
IExecutor

是回調執行點。

callback
IOutcomeReceiver

回調通知 queryLocation 的結果。

屬性

備註

查詢裝置位置以便撥打緊急電話。 只有 SIM 通話管理器才能撥打此方法來處理代表緊急通話的連線。 若先前的地點查詢請求未完成,新的位置查詢請求將被拒絕,並回傳 QueryLocationException QueryLocationException#ERROR_PREVIOUS_REQUEST_EXISTS

Java 文件 android.telecom.Connection.queryLocationForEmergency(long, java.lang.String, java.util.concurrent.Executor, android.os.OutcomeReceiver<android.location.Location, android.telecom.QueryLocationException>)。

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

適用於