Experimental App APIs
Experimental App APIs
The current methods allow applications to generate passive notifications.
API reference: chrome.experimental.app
Methods
clearAllNotifications
chrome.experimental.app.clearAllNotifications(object
details, function
callback)
Clears all previously sent notifications.
Parameters
-
details
(
optional
object
)
-
Undocumented.
-
-
extensionId
(
optional
string
)
- An optional id to do notifications for an app other than the calling app. This is just to allow prototyping with an extension that sends notifications on behalf of apps that don't support notifications yet; this will be removed before the API becomes stable.
-
callback
(
optional
function
)
- A callback when the function is complete. Any errors will be reported in chrome.extension.lastError.
Callback function
If you specify the callback parameter, it should
specify a function that looks like this:
function() {...};
notify
chrome.experimental.app.notify(object
details, function
callback)
Creates a notification from this app.
Parameters
-
details
(
object
)
-
Undocumented.
-
-
extensionId
(
optional
string
)
- An optional id to do notifications for an app other than the calling app. This is just to allow prototyping with an extension that sends notifications on behalf of apps that don't support notifications yet; this will be removed before the API becomes stable.
-
title
(
optional
string
)
- The title of the notification.
-
bodyText
(
optional
string
)
- The text content of the notification.
-
linkUrl
(
optional
string
)
- The URL for an optional link to show along with the notification. If you specify a linkUrl, you must also specify a value for linkText.
-
linkText
(
optional
string
)
- If a linkUrl is provided, this is required and will be used as the linkified text. It should be relatively short.
-
callback
(
optional
function
)
- A callback when the function is complete. Any errors will be reported in chrome.extension.lastError.
Callback function
If you specify the callback parameter, it should
specify a function that looks like this:
function() {...};