Disable heads-up notifications How to disable heads-up notifications (pop-up notifications)?
(These are the notifications that show at the upper part of the screen and obstruct the view.)
First of all you'll have to install adb on your pc and then connect your phone and run the commands
Installing ADB

Download adb installer from HERE on your pc
Run the setup and do as directed to install adb.
See THIS video for reference

Connecting device and running command

To use ADB with your Android device, you must enable a feature called USB debugging. Open your phone’s app drawer, tap the Settings icon, and select “About Phone”. Scroll all the way down and tap the “Build Number” item seven times. You should get a message saying you are now a developer.

Head back to the main Settings page, and you should see a new option near the bottom called “Developer Options”. Open that, and enable “USB Debugging”.

Later on, when you connect your phone to your computer, you’ll see a popup entitled “Allow USB Debugging?” on your phone. Check the “Always allow from this computer” box and tap OK. Select connection type to MTP from charge only if this doesn't pop up.
Take a look at THIS if you're stuck somewhere.. Everything mentioned above is demonstrated here with pictures

Now open command prompt and type adb devices. You'll see a device listed there.

Enter adb shell settings put global heads_up_notifications_enabled 0 to distable it. And if you want to enable it back again enter adb shell settings put global heads_up_notifications_enabled 1