MediaRouter2.RequestScan(MediaRouter2+ScanRequest) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Requests the system to actively scan for routes based on the router's route discovery preference.
[Android.Runtime.Register("requestScan", "(Landroid/media/MediaRouter2$ScanRequest;)Landroid/media/MediaRouter2$ScanToken;", "", ApiSince=35)]
public Android.Media.MediaRouter2.ScanToken RequestScan(Android.Media.MediaRouter2.ScanRequest scanRequest);
[<Android.Runtime.Register("requestScan", "(Landroid/media/MediaRouter2$ScanRequest;)Landroid/media/MediaRouter2$ScanToken;", "", ApiSince=35)>]
member this.RequestScan : Android.Media.MediaRouter2.ScanRequest -> Android.Media.MediaRouter2.ScanToken
Parameters
- scanRequest
- MediaRouter2.ScanRequest
Returns
A unique ScanToken that identifies the scan request. This value cannot be null.
- Attributes
Remarks
Requests the system to actively scan for routes based on the router's route discovery preference. You must call cancelScanRequest(ScanToken) promptly to preserve system resources like battery. Avoid scanning unless there is clear intention from the user to start routing their media. scanRequest specifies relevant scanning options, like whether the system should scan with the screen off. Screen off scanning requires Manifest.permission.MEDIA_ROUTING_CONTROL or Manifest.permission.MEDIA_CONTENT_CONTROL. Proxy routers use the registered RouteDiscoveryPreference of their target routers.
Android reference for android.media.MediaRouter2.requestScan.
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.