How to close chrome notifications programmaticaly without clearing -


I currently use the user to determine the length of time a user displays a notification popup for the user I am However, I think because I am using chome.notifications.clear () , I have no unwanted side-effects of notification in the system tray / bell icon menu.

Is there a way where I can set the duration of displaying a notification popup without deleting it from the list of Notifications in the Programs tab / bell icon menu?

Here is a snippet of my notification creation code:

  var select = {type: "basic", title: notification. App + ":" + Notification "Message:" ", icon URL: Daturaire, References: time} var note = chrome.notifications.create (" someid ", opt, function (id) {console.log (" notification id: "+ id); setTimeout (Function () {chrome.notifications.clear (id, function was cleaned)} {// need to do something?});} Get_value_from_local ("note_time") * 1000);})  

is a notification asset, priority , that you require Behavior can be used to emulate.

On information, clearly, urine is poor, But more information can be extracted from linked articles (emphasis Khan):

The information can be assigned priority between -2 to 2. Preferences & lt; 0 Only highlights are displayed in the center ; preferences> 0 periods, and more high priority notifications can be displayed in system tray.

In fact, you Update can show priority values ​​or your suggestion Received to hide.

  chrome.notifications.create ("test", {type: "basic", iconUrl: "ion.png", title: "test", message: "hide me!"}, Function () {setTimeout (function () {chrome.notifications.update ("test", {preference: -1}, function () {});}, 1000);});  

Similarly if you have priority of update 0 or above, then an existing notification will be visible again.


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -