title: How can I put a lock on my app so It can't be removed from recent screens
body: <p>I want to put a lock icon to my app. How can I do that programmatically as in some social apps like in the following picture? I want to prevent the user from clearing my app from recent screens or task as it's using services in the background and Oppo, Mi and Lenovo kills it. I already tried it but it didn't work for me </p>
  
  <pre><code>startLockTask();
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/whXLP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/whXLP.png" alt="enter image description here"></a></p>