I am using this https://github.com/mozilla-b2g/gaia/blob/master/apps/system/js/notifications.js#L271