title: How to switch off and restart android phone programmatically without root in marshmallow
body: <p>I want to make a app where user can set the time for switch off the phone and switch on (like user set the time for evening 7 pm to off and morning 7 am to switch on automatically). Is there any possible way to perform this action without rooted ? </p>
  
  <p>Please suggest me.</p>
  
  <p>And also try to give </p>
  
  <pre><code>&lt;uses-permission android:name="android.permission.REBOOT"/&gt;
  </code></pre>
  
  <p>permission but it's also not possible for me to granted as manually and runtime.</p>