Reputation: 23
Is there any way to show notifications from my packaged app even if it's not running? I've looked into the alarms API (http://developer.chrome.com/apps/alarms.html) but couldn't find anything related to this.
Upvotes: 2
Views: 139
Reputation: 4672
Use the Rich Notifications API. It seems unlikely you didn't know that, though, so I'm going to guess you're asking how to run code when your app isn't running. As you said in your question, alarms are one of many ways to do this. Set an alarm, and in the event listener for that alarm, you'll pop up a rich notification. That's pretty much it.
Upvotes: 1