I have a small baby (a toddler of under 2 years) who is very active (to put it mildly) and is always up to something naughty. To make sure me and my wife get some moments of peace, we sometimes put him in a high chair, and play his favorite rhymes and kids videos on my Android phone.
One major problem we've been facing was that he touches the screen frequently and after every few minutes, we've to make sure that the app is still active and videos are still being played. I am sure many of you might also been facing the same (or similar, child-proofing) problems.
Recently, I found out an elegant way of getting around my problem, and in this tutorial, I'll be quickly discussing all the steps involved in the solution. But before we move ahead, it's worth mentioning that all the steps mentioned henceforth have been tested on a Google Nexus 5 running Android Marshmallow (6.0.1) OS.
Yes, screen pinning is the functionality that I'll be discussing here. The feature lets you keep an app's screen in view until you unpin it.
To begin with, you have to make sure that the Screen pinning option - found in Settings->Security - is ON.
Once that is done, open the app whose screen you want to pin, and the tap the Overview button (the square button present at the bottom-right of your phone). Here's a screenshot of the YouTube app in Overview mode in my case:
As you can see, there's a pin icon at the bottom-right of the app window - similar icon will be there in your case as well. Just tap it, and you'll be informed that the screen is pinned, as well as how you can unpin it when you want:
Now, if you (or your babies, as is the case with me) ever try to come out of the app, the feature won't let it happen - a message informing that you need to unpin the screen is displayed.
When you try to unpin using the way described above, the system will ask you for your lock screen password. Once that is entered, the screen will get unpinned. That's it.
For more information on screen pinning and unpinning, head here.