El botón de acción de notificación no se muestra en el cuadro de notificación
Frecuentes
Visto 281 veces
0
can anyone please give the syntax for chrome notification containing buttons??I am not sure about the syntax for adding buttons to notification box in chrome.Can anyone please help me?? This is my code for notification.
chrome.notifications.create(
'id1',{
type: 'basic',
iconUrl: '/icon_128.png',
title: 'Althe Frazon',
message: 'Lorem ipsum',
buttons: [{ title: 'Call'
},
{ title: 'Send Email'
}],
priority: 0
},
function() { /* Error checking goes here */}
);
notification.show();
Using this code the notification is shown.But the buttons are not shown.Anygone please guess the reason.Why my buttons are not shown??Please help me
1 Respuestas
0
For anyone landing on this page looking for a way to add buttons to notifications or trying to figure out why no buttons are shown:
Esta respuesta explains in detail how to create notifications and how to add buttons.
Nonetheless, the buttons are not displayed on some distributions of Linux.
Es un problema conocido (still holding for Chrome version 31.0.1650.57) and depende de Views
shipping on Linux.
contestado el 23 de mayo de 17 a las 11:05
No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas google-chrome-extension notifications or haz tu propia pregunta.
chrome.notifications.create
creates and displays a notification, so there is no need fornotification.show()
. (What does it refer to anyway ?) - gkalpakParece ser un problema conocido: chrome.notifications.create does not display the Buttons - Marc
@user1991: Hm...it seems to be an OS-dependent issue. What OS are you on ? - gkalpak