Tags

, ,

At Google IO 2013, Google released the smart queries like “Remind me to buy milk” and that was awesome with Google search app in Android. Now that awesomeness comes to Chrome. Google Chrome is now coming with Rich Notification Support.

This is a superb advantage for developer and users. Now Chrome developers can use

chrome.notifications.create(id, options, creationCallback);

as the syntax and can create a basic notification

var opt = { 
  type: "basic", 
  title: "Primary Title", 
  message: "Primary message to display", 
  iconUrl: "url_to_small_icon" 
}

A bit useful example can be

 chrome.notifications.create(
 ‘id1’,{   
         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 */}
); 

Rich notifications include full-bleed icons and space to convey a headline and short message. Additionally, they enable you to create action buttons and respond to clicks right within your app, empowering your users to do anything they could do within the app’s UI itself. For example, a mail app could show multiple unread emails within a single notification using the list type. You can also specify different priorities for notifications that determine how long they stay on the screen before moving into the notification center where they continue to live until dismissed by the app or user.

image

Advertisements