1

How to update a notification using javascript api

Тема: How to update a notification using javascript api

i have gone through the steps described to update a notification using remote api from this URL : http://sdk.wialon.com/wiki/en/sidebar/r … tification

but i can't find a function to update a notification using javascript api

please direct me with this

thanks

2

How to update a notification using javascript api

Re: How to update a notification using javascript api

ameen, to update notification in js You can use such code:

+ открыть спойлер
var res = wialon.core.Session.getInstance().getItem(<your_res_id>);
var nf = {
                     "id":<long>,
                     "n":<text>,
                     "txt":<text>,
                     "ta":<uint>,
                     "td":<uint>,
                     "ma":<uint>,
                     "mmtd":<uint>,
                     "cdt":<uint>,
                     "mast":<uint>,
                     "mpst":<uint>,
                     "cp":<uint>,
                     "fl":<uint>,
                     "tz":<int>,
                     "la":<text>,
                     "un":[<long>],
                     "sch":{    
                        "f1":<uint>,
                        "f2":<uint>,
                        "t1":<uint>,
                        "t2":<uint>,
                        "m":<uint>,
                        "y":<uint>,
                        "w":<uint>
                     },
                     "trg":{    
                        "t":<text>,
                        "p":{    
                            <text>:<text>,
                            ...
                        }
                     },
                     "act":[    
                        {
                            "t":<text>,
                            "p":{    
                                <text>:<text>,
                                ...
                            }
                        }
                     ]
};
res.updateNotification(nf, function(code, data) {console.log(code, data)});
Head of Wialon Local Department
Gurtam