No Activity While The Sound Is Running

How can I code such that the app did not do any activity given by the user while the sound is running?

A post was merged into an existing topic: Close All Types Of Notifications