You can trigger a rich notification by calling the create method under the chrome.notifications module:
chrome.notifications.create(
‘id1’,{
type: ‘basic’,
iconUrl: ‘image1.png’,
title: ‘Althe Frazon’,
message: ‘Hi, what's going on tonight?’,
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.
Apart from the basic notification type shown above, you can use other formats like image to show a preview of an image within the notification or list to coalesce multiple notifications from your app into a single one. 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.
The notification center holds all current notifications and can be pulled up at any time from the launcher on ChromeOS or the system tray on Windows. Users can view and clear all of their notifications in the center, and also access settings to control which apps, extensions and websites can send them notifications.
Notification Center on Windows
Notification Center on ChromeOS
You can get started with rich notifications in your app or extension by trying out the Notify Test App and taking a look at the documentation on the Chrome developer site. We’d love your feedback so feel free to ask a question on Stack Overflow, start a discussion on our mailing list, or file a bug on our issue tracker.
Posted by Justin DeWitt, Software Engineer and Notifications Knight
Starting in today’s Beta, your apps get a free speed boost from Blink’s new threaded HTML parser. It has two under-the-hood performance benefits: (1) reduced jankiness by moving work off the main JavaScript thread, and (2) improved page loading speed through pipelining. Compared to the normal HTML parser, it loads DOM content about 10% faster and reduces the maximum stop time due to parsing by 40%.
Experimental new media features in Chrome for Android
In today's Beta, Web Audio joins WebGL and WebRTC as an option in about:flags in Chrome for Android.
Used together or independently, these three features will allow you to create rich, powerful web experiences that work across device form factors. We’re still actively improving the implementations, but we invite you to start experimenting. To see them in action, watch the mobile web demo in the Google I/O 2013 keynote.
Deprecated features
The prefixed version of the Content Security Policy HTTP header is nowdeprecated, so please use Content-Security-Policy instead of X-WebKit-CSP. The prefixed version will still work for now, but future releases may not support it.
For Chrome Extensions, HTML-based notifications have been deprecated in favor of the new Rich Notifications Chrome API. Extensions developers who are using HTML notifications in their apps or extensions should migrate to the newer Rich Notifications API, as support for the existing createHTMLNotification() feature will stop working in a future release of Chrome.
As part of V8's continuing quest to make all JavaScript as fast as possible, recentoptimizationshave made the asm.js benchmarks more than twice as fast as prior versions of Chrome.
For general information about what’s going on in Chromium and Blink, watch the recordings of the fireside chats with the Blink team and the Chrome team at Google I/O 2013.
Posted by Alexandre Elias, Software Engineer and Screen Space Conservationist
After you've downloaded the OpenInChromeController class and added it to your project, you’ll be able to check if Chrome is installed, and if so, send links to Chrome with or without x-callback enabled. Additionally, you can specify whether or not to open a new tab when sending a link to Chrome. For a deeper dive and to download the code, check out our developer docs.
Posted by Michele Aiello, Software Engineer and Callback Captain
Many of these apps are works in progress, which is why we’re only making them easily available on Chrome’s dev channel. If you’ve written a packaged app, or are working on one, now is a great time to get some early feedback and polish your app before Chrome packaged apps become more broadly available.
A number of developers have taken advantage of the early preview to publish apps that demonstrate the new powerful capabilities of the packaged apps platform. If you're looking for inspiration, we've highlighted a few of them for you to try out in the Web Store’s Apps category. If you’re not sure whether a Chrome packaged app is right for you, you can learn more at our developer site: developer.chrome.com/apps. As always, we welcome your feedback on our G+ Developers page or our developer forum.
Posted by Amanda Bishop, Product manager and (web) store keeper