0

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 Answers 3

0

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.

2
  • But why is the old createHTMLNotification removed then if this is not supported? How can I make same notifications as before now in legacy packed app?
    – Gapipro
    Jul 19, 2013 at 5:34
  • That feature was removed from Chrome. If you're interested in building an app that you can publish and that has all the features you want, look into non-legacy packaged apps.
    – sowbug
    Jul 20, 2013 at 14:51
0

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.

1
  • But why is the old createHTMLNotification removed then if this is not supported? How can I make same notifications as before now in legacy packed app?
    – Gapipro
    Jul 19, 2013 at 5:33
0

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.