Chrome Rich notifications not working in legacy packed app

606 views Asked by At

With Chrome 28 google added new Rich Notifications.

I was trying to get it working with Chrome legacy packed app but that doesn't seem to work. Google published sample packed app that uses Rich notifications but as soon as you change packed app to legacy packed app you get an error at notification creation.

notifications.create: Unknown error. lastError:29 
set lastError:29
(anonymous function) sendRequest:46
forEach utils:21
chromeHidden.handleResponse

Here is this changed sample app that is not working any more. https://dl.dropboxusercontent.com/u/3546822/rich-notifications-broken.zip

Only thing I changed was to replace:

"background" : {
      "scripts" : ["app.js"]
    }

with

"launch" : {
      "local_path": "window.html"
    }

What am I doing wrong?

PS: Application has permissions for notifications.

3

There are 3 answers

0
Gapipro On BEST ANSWER

So it looks like only way for old legacy packaged apps is to use HTML5 Notification api. https://developer.mozilla.org/en/docs/Web/API/notification

2
sowbug On

Legacy packaged apps are, as you say, legacy, and as such won't be getting new features. I don't believe you can upload them anymore to the Web Store, so you wouldn't be able to publish them even if they had the features you want.

1
方 觉 On

According to https://code.google.com/p/chromium/codesearch#chromium/src/chrome/common/extensions/api/_permission_features.json&q=_permission_features.json&sq=package:chromium&type=cs&l=420, rich notifications are only available to extensions and 'new' packaged apps. Legacy packaged apps cannot use them.