共用方式為


Connection.QueryLocationForEmergency Method

Definition

Query the device's location in order to place an Emergency Call.

[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

Parameters

timeoutMillis
Int64

long: Timeout in millis waiting for query response (MAX:5000, MIN:100).

provider
String

String: the location provider name, This value cannot be null. It is the caller's responsibility to select an enabled provider. The caller can use android.location.LocationManager#getProviders(boolean) to choose one of the enabled providers and pass it in.

executor
IExecutor

The executor of where the callback will execute.

callback
IOutcomeReceiver

The callback to notify the result of queryLocation.

Attributes

Remarks

Query the device's location in order to place an Emergency Call. Only SIM call managers can call this method for Connections representing Emergency calls. If a previous location query request is not completed, the new location query request will be rejected and return a QueryLocationException with QueryLocationException#ERROR_PREVIOUS_REQUEST_EXISTS

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

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