Lingua

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. android.net.nsd.NsdManager.DiscoveryListener.onServiceFound(NsdServiceInfo) will be called at most once, and discovery will stop if a service is selected or the user cancels the request. Manifest.permission.ACCESS_LOCAL_NETWORK permission is *not* necessary when discovering with this flag.

Once a service has been selected by the user in the UI picker, NsdManager.resolveService(NsdServiceInfo,java.util.concurrent.Executor,NsdManager.ResolveListener) or NsdManager.registerServiceInfoCallback(NsdServiceInfo,Executor,NsdManager.ServiceInfoCallback) can be called for that service without requiring the Manifest.permission.ACCESS_LOCAL_NETWORK permission or any further UI being displayed.

If neither FLAG_NO_PICKER nor FLAG_SHOW_PICKER is set, the picker will be shown if the app does not have Manifest.permission.ACCESS_LOCAL_NETWORK permission.

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