On Wednesday, November 6, 2013 3:18:48 PM UTC+1, jose llopis wrote:
> hi im developing some kind of hack to implement repeated notifications on 1.0
> and 1.1
> but i did not see any function to dismiss a moznotification
>
> Is there any method to achieve this?
>
> btw i post here my code (althought it hast not implemented yet the icon
> feature) :
>
> var compatNotif={};
> compatNotif.createNotification=function(id,title,txt,icon){return
> navigator.mozNotification.createNotification(title,txt);}
> compatNotif.idList=[];
>
> document.getElementById("btn").onclick=function(){
> var idN=document.getElementById("idNot").value;
> if(idN in compatNotif.idList)
> {
> compatNotif.idList[idN].notification.close();
> compatNotif.idList[idN].value++;
>
> compatNotif.idList[idN].notification=compatNotif.createNotification(1,"titulo","aaa
> "+compatNotif.idList[idN].value);
> }
> else
> {
> compatNotif.idList[idN]={};
>
> compatNotif.idList[idN].notification=compatNotif.createNotification(1,"titulo","aaa");
> compatNotif.idList[idN].value=1;
> }
> compatNotif.idList[idN].notification.show();
> };
I think closing notifications can only be done by system app, where they live
after showing them. We don't keep track of em in gecko anymore.
_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g