I totally missed this in my Android 4.3 teardown, but luckily there are some fellow tinkerers out there, namely Kevin of TeslaCoil Software (maker of fine products such as Nova Launcher and WidgetLocker), picking up my slack. It looks like Google is planning some cool notification services for 4.3, possibly something that gets third party apps into the mix!
Contained in the leaked S4 Android 4.3 build are all sorts of notification-related changes. After being pointed in the right direction, I spotted this:
<string name="manage_notification_access">Notification access</string>
<string name="manage_notification_access_summary_zero">Apps cannot read notifications</string>
<string name="no_notification_listeners">No notification listeners are installed.</string>
<string name="notification_listener_security_warning_title">Enable %1$s?</string>
<string name="notification_listener_security_warning_summary">%1$s will be able to read all notifications posted by the system or any installed app, which may include personal information such as contact names and the text of messages sent to you. It will also be able to dismiss these notifications or touch action buttons within them.</string>
The last string is the most important one, spelling out a new notification service where apps ("Notification Listeners") can read notifications, dismiss them, and activate action buttons in a notification. That sounds like just about everything the notification panel currently does, so, short of launching it from the status bar, it sounds like a 3rd party app would be able to replicate the entire notification panel.
There's even some UI to go along with this. This "Notifications" screen is actually a notifications history. The lit up notifications are currently active (Notice the Gmail icon in the status bar) and the grayed out ones are notifications which have been dismissed, which have never been visible in Android before. Tapping on a notification just brings you to the app info screen for that app.
This is exposed in the 4.3 leak as a settings shortcut. So long press on your homescreen, pick "shortcuts," then "settings shortcuts" and you should see a "Notifications" listing. Tap it and you'll get a shortcut for this screen.
The "Notification access" screen can be opened by digging through the Settings activities. The screen currently lists "No notifications listeners are installed," since no one knows how to plug into this yet. Presumably, a "notification listener" is a 3rd party app with access to your notifications.
There are 2 new permissions that power this:
<permission android:label="@string/permlab_accessNotifications" android:name="android.permission.ACCESS_NOTIFICATIONS" android:protectionLevel="system|signature" android:description="@string/permdesc_accessNotifications" />
<permission android:label="@string/permlab_bindNotificationListenerService" android:name="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE" android:protectionLevel="signature" android:description="@string/permdesc_bindNotificationListenerService" />
They're called "Access Notifications" and "Notification Listener Service." The puzzling thing is that the protection level for these permissions is too high for 3rd party apps. "Android:protectionLevel="signature" means "Google/OEM only" (whoever signs it) and "android:protectionLevel="system|signature"" means "System apps or Google/OEM only" no one else is allowed to access these permissions. If you scroll up and read the security warnings, though, it's clear this is meant for 3rd party apps. There would be no reason for Google to warn you about themselves and allow you to revoke notifications access from Google Apps.
So we're missing some piece of this puzzle. Maybe in the future the protection level will be lower, or maybe there is some intermediate piece that will connect to these system permissions to other apps.
If you're wondering what all of this is for, Kevin has some great theories. Right now, apps that need access to your notifications usually hack in through the Accessibility API. A lot of popular apps like Light Flow and Tasker have to deal with this workaround because there is just no supported way to get notification information. This would be a big help for them. I contact Andrew Moore, the developer of Light Flow, for the article, and he reminded me that Google actually gave him a heads-up on one Android 4.3 notification change: Foreground apps will be required to have a status bar icon. The fact that Google contacted him about a future change means they really do care about apps like Light Flow, so maybe they're going to make his life easier with a Notifications API.
This could be a huge boost for wearable computing. The Pebble Smart Watch, is another abuser of the Accessibility API, which it uses to pull down notification info. Google Glass is another notification-challenged wearable, which completely ignores your phone notifications and goes the stand-alone route, with very limited app support as a result. And If Google ever gets around to their own smart watch platform, they're going to run into the same problems as Glass and Pebble. All of these wearable computing platforms need an easy way to read, dismiss, and act on notifications, and it really looks like that's what Google is building. Imagine if your smart watch took advantage of this, and could activate notification action buttons. You'd have a super simple way to archive the latest Gmail message, or pause music on your favorite music player. Controlling your phone's notification panel from another device would make an Android phone the premier companion device for a wearable computer.
The other potential application is for 3rd party notification panels. Android already lets you replace many system components; you're free to swap out the keyboard, home screen and many other bits of Android for 3rd party solutions, why not the notification panel? The notification panel is one of the most customized pieces of Android, so giving OEMs (and 3rd parties) a way to do that without compromising the stock panel would be an amazing feature.
Right now, it looks like there would be enough functionality to replicate the notification panel, but not replace it. As far as I can see, Google would need to implement an intent for the status bar pull-down gesture and separate the notification panel from the rest of the system UI for that to work. This might be a first step in that direction, though.
If Google actually gets this working and open to third parties, Android 4.3 will be a wearable computer's best friend. This is the first 4.3 feature I've seen that's gotten me really excited. Start up the hype train.