Sunday, May 26, 2013

Rich Notifications in Chrome

Inline image 1

App notifications send immediate alerts to users about important events as they happen. Chrome and Chrome OS already support basic web notifications, but rich notifications for Chrome packaged apps and extensions can enable users to act directly on these notifications and show rich content like lists and images. For those in beta channel, notifications now live in a center that is outside the browser, which allows them to receive notifications even when the browser is not open. Rich notifications are available in the latest beta channel builds on Windows, dev channel builds on ChromeOS, and will be coming to Mac OS X and Linux soon.

You can trigger a rich notification by calling the create method under the chrome.notifications module:

      type: 'basic', 
      iconUrl: 'image1.png', 
      title: 'Althe Frazon', 
      message: 'Lorem ipsum',
      buttons: [{ title: 'Call', 
                  iconUrl: 'call.png'},
                { title: 'Send Email', 
                  iconUrl: 'email.png'}],
      priority: 0},
  function() { /* Error checking goes here */} 


Read more: Chromium blog
QR: Inline image 2