Επεξεργασία

Κοινή χρήση μέσω


IGeoPositionWatcher<T>.TryStart(Boolean, TimeSpan) Method

Definition

Start acquiring location data, specifying an initialization timeout. This method returns synchronously.

public:
 bool TryStart(bool suppressPermissionPrompt, TimeSpan timeout);
public bool TryStart (bool suppressPermissionPrompt, TimeSpan timeout);
abstract member TryStart : bool * TimeSpan -> bool
Public Function TryStart (suppressPermissionPrompt As Boolean, timeout As TimeSpan) As Boolean

Parameters

suppressPermissionPrompt
Boolean

If true, do not prompt the user to enable location providers and only start if location data is already enabled.

If false, a dialog box may be displayed to prompt the user to enable location sensors that are disabled.

timeout
TimeSpan

Time in milliseconds to wait for initialization to complete.

Returns

true if succeeded, false if timed out.

Applies to