Permission error android.permission.SHUTDOWN, how to solve?

Help me!
Permission error to make me restart the phone by pressing a button inside the app.

How do I add this permission?

Attached error photo.
Screenshot_20220222-152225

Is this related to App to turn off cell phone ? Did you use the suggested extension ?

Yes, it is for the mobile shutdown app.
however, the suggested extension doesn’t meet what I’m looking for.
I need a button within the application, which as soon as pressed will turn off the cell phone directly and not open a dialog box and only then turn it off.

Can you help me to turn off the application directly, just by pressing a button inside the application?

I’m trying to do this procedure with the activity starter, but I’m not getting it.

you can do it only on rooted devices, see also

read also the other answers there…

EDIT: see also

Taifun