title: How to show power off menu on android on the click of a button?
body: <p>I want to implement a functionality where on the click of a button the menu of android appear which we see on the long tap of power button, and then the user can choose to turn the device off.</p>
  
  <p>I'm talking about this menu</p>
  
  <p><a href="https://i.stack.imgur.com/PjRNb.png" rel="noreferrer"><img src="https://i.stack.imgur.com/PjRNb.png" alt="enter image description here"></a></p>
  
  <p>I need it to be without root. There's an app on store which does it without requiring root.
  <a href="https://play.google.com/store/apps/details?id=com.jjo.lockScreenButton" rel="noreferrer">https://play.google.com/store/apps/details?id=com.jjo.lockScreenButton</a></p>