Android Question How to close notification dialog?


Hello everyone,
Good day,

I use this to make notifications permission but I have a problem
I have added request notification permission in Activity_Create
1- when I touch the back button it restarts the app I don't need to restart the app I need to close the notification dialog only without any action.
2- if I click Allow it's restart the app but it works fine after this.
3- if I click Don't allow it's restart the app and keep stopping it!!

how to resolve these problems?