Lock down App

How can I lock by ionic application such that no other application can open until exit button press in my application.

That means no event should trigger on press of home button, back button or menu button in android and IOS.

Scenario : Student takes an exam in ionic application, then he/she not able to open chrome or any other application for the help.