Heads up notifications were one of the better features to come to stock Android as a native function baked into the Lollipop 5.0 version UI, but not everyone wanted heads up notifications on for every single application. In a world where privacy is increasingly less and less, users tend to take control of their privacy where they can, even if this means turning off something like heads up notifications so anyone who might decide to look over your shoulder can't read what pops up. With Android M Google is changing heads up notifications ever so slightly to give users a little more control.
With the M release, and for anyone who is already playing around with the developer preview of Android M which Google released into the wild yesterday for the Nexus 5, Nexus 6, Nexus 9, and Nexus Player, heads up notifications can be disabled on an individual application basis, meaning users can turn them off for some apps and leave them on for others. For example, want to turn them off for Gmail but leave them on for Hangouts, Messenger, WhatsApp, or any other messaging app you may use? Android M will allow this type of control. This will also come in handy for anyone who simply wants to avoid getting heads up notifications for apps which come in constantly during use of other apps.
With Android M, users can navigate into each applications personal notification settings page and toggle on or off a handful of different settings. Users can manage whether or not they want all notifications to be blocked for a specific app, whether to treat that app as a priority so notifications come in when priority mode is turned on, and whether or not to "allow peeking" for that specific application which refers to the heads up notifications. Without peeking enabled, notifications still come through but simply get directed to the notification tray that's exposed when you pull down the panel from the status bar instead of showing up at the top of the display wherever you are on the phone. With peeking of notifications being in control of the user, it joins other functions which users now have more control over in Android M, like permissions which will only ask users for acceptance once they try to open apps and use them as opposed to during the installation process. It's also one of many refinement tweaks in Android M alongside customizable Quick Settings tiles, the new Doze feature meant to help conserve battery life, and the new RAM management screen.