Native android notification access control

I have a scenario where after logging into the app it will redirect to the android notification access page. Here I want to allow access to the particular app. How can I achieve this?

What problem? Find your app switcher and tap on it.

I need to enable the notification access permission for Google paly services from the list. How can I do that?
I tried through the xpath locator but couldn’t do it

You need find first what your app in row count. E.g. Ather ia third one. Now find switches by classname and tap on third one.

Thanks for the help @Aleksei. It helped me to get the solution

Is there appium or adb command that can enabled this programatically?

Try GitHub - appium/appium-uiautomator2-driver: Appium driver for Android UIAutomator2 plus running GitHub - appium/appium-uiautomator2-driver: Appium driver for Android UIAutomator2 with the following arguments:

cmd notification allow_listener <your_notification_listener_service_class>

Thanks for answering.
I tried everything, however when I run the test using appium, the notification is not getting received, any idea why?
I do run appium, emulator programatically, delay also added but nothing works. Permission is also allowed