CompanionDeviceManager.RequestNotificationAccess(ComponentName) 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.
Request notification access for the given component.
[Android.Runtime.Register("requestNotificationAccess", "(Landroid/content/ComponentName;)V", "", ApiSince=26)]
public void RequestNotificationAccess (Android.Content.ComponentName? component);
[<Android.Runtime.Register("requestNotificationAccess", "(Landroid/content/ComponentName;)V", "", ApiSince=26)>]
member this.RequestNotificationAccess : Android.Content.ComponentName -> unit
Parameters
- component
- ComponentName
- Attributes
Remarks
Request notification access for the given component.
The given component must follow the protocol specified in NotificationListenerService
Only components from the same ComponentName#getPackageName package
as the calling app are allowed.
Your app must have an association with a device before calling this API
Calling this API requires a uses-feature PackageManager#FEATURE_COMPANION_DEVICE_SETUP
declaration in the manifest
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.