title: How to keep screen consistent even after pressing back or exit button in Android
body: <p>I am using Android Studio as a development platform for Android App Development.
  I have implemented a module of OTP screen for OTP verfication.</p>
  
  <p>I want to achieve following things:</p>
  
  <ol>
  <li>The OTP screen should be consistent even if the user presses back or home screen like PAYTM &amp; app should run in background untill the OTP is not confirmed.</li>
  <li>The OTP section should automatically read the incoming message so.</li>
  <li>I also want to get the permissions how to set that permission thing
  like permission to read sms, permission to read contact which will
  either ask allow or deny.</li>
  </ol>
  
  <p>I am new to this thing and I have no idea how to implement this. </p>