Język

DiscoveryRequest.FlagShowPicker Field

Definition

Indicates that a UI service picker must be shown to the user for this request.

[Android.Runtime.Register("FLAG_SHOW_PICKER", ApiSince=37)]
public const long FlagShowPicker = 2;
[<Android.Runtime.Register("FLAG_SHOW_PICKER", ApiSince=37)>]
val mutable FlagShowPicker : int64

Field Value

Value = 2

Implements

Attributes

Remarks

Indicates that a UI service picker must be shown to the user for this request.

If this flag is set, the user will be prompted to choose a service to be discovered among all services matching the discovery service type and discovery filters. OnServiceFound(NsdServiceInfo) will be called at most once, and discovery will stop if a service is selected or the user cancels the request. The AccessLocalNetwork permission is not necessary when discovering with this flag.

Once a service has been selected by the user in the UI picker, ResolveService(NsdServiceInfo, IExecutor, NsdManager+IResolveListener) or RegisterServiceInfoCallback(NsdServiceInfo, IExecutor, NsdManager+IServiceInfoCallback) can be called for that service without requiring the AccessLocalNetwork permission or any further UI being displayed.

If neither FlagNoPicker nor FlagShowPicker is set, the picker will be shown if the app does not have the AccessLocalNetwork permission.

This flag cannot be combined with FlagNoPicker or FlagUserApprovedOnly.

Android reference for android.net.nsd.DiscoveryRequest.FLAG_SHOW_PICKER.

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