I want to hide all notifications of other apps when my Android app is in foreground. Is this possible? How? : <p>I am creating an educational app where school students can appear for 5 mins quick exams. Most of the time they are using their parent's mobile phone.</p>

<p>Now what I want is that when a student is giving the exam, no notification should come from any other app such as WhatsApp, FB or Gmail. </p>

<p>Is this possible? How? </p>
